获取规范货币类型UDF函数
实现步骤:
1.将写好的代码打包上传到hdfs目录:/user/lib/
2.执行如下命令:
drop function NormCurrencyType;
ADD JAR hdfs://nameservice1/user/lib/GetNormCurrencyTypeUDF.jar;
CREATE FUNCTION NormCurrencyType AS
'com.mingyang.GetNormCurrencyTypeUDF'USING JAR
'hdfs://nameservice1/user/lib/GetNormCurrencyTypeUDF.jar';
reload functions;
3.测试: