-
0.继承org.apache.hadoop.hive.ql.exec.UDF类实现evaluate
- 1.编译器导入hive支持jar包,编码打包,上传自定义函数jar包
- 2.hive添加jar包:add jar /jar包路径/xxx.jar;
- 3.创建临时函数: create temporary function 函数别名 as '包名..函数主类名';
- 4.调用: select id, 函数别名(字段参数) from 表名;
- 5.保存到HDFS中: create table 表名 row format delimited fields terminated by '\t' as select id, 函数别名(字段参数) from 表名;
Hive:自定义函数使用
猜你喜欢
转载自blog.csdn.net/JinChao94/article/details/111469915
今日推荐
周排行