hive udf使用
来源:互联网 发布:淘宝的好处演讲 编辑:程序博客网 时间:2024/06/14 05:30
0.要继承org.apache.hadoop.hive.ql.exec.UDF类实现evaluate
自定义函数调用过程:
1.添加jar包(在hive命令行里面执行)
hive> add jar /root/NUDF.jar;
2.创建临时函数
hive> create temporary function getNation as 'cn.itcast.hive.udf.NationUDF';
3.调用
hive> select id, name, getNation(nation) from beauty;
4.将查询结果保存到HDFS中
hive> create table result row format delimited fields terminated by '\t' as select * from beauty order by id desc;
hive> select id, getAreaName(id) as name from tel_rec;
create table result row format delimited fields terminated by '\t' as select id, getNation(nation) from beauties;
自定义函数调用过程:
1.添加jar包(在hive命令行里面执行)
hive> add jar /root/NUDF.jar;
2.创建临时函数
hive> create temporary function getNation as 'cn.itcast.hive.udf.NationUDF';
3.调用
hive> select id, name, getNation(nation) from beauty;
4.将查询结果保存到HDFS中
hive> create table result row format delimited fields terminated by '\t' as select * from beauty order by id desc;
hive> select id, getAreaName(id) as name from tel_rec;
create table result row format delimited fields terminated by '\t' as select id, getNation(nation) from beauties;
0 0
- HIVE UDF函数使用
- hive udf使用间隔
- hive udf使用
- hive使用案例和UDF
- hive UDF使用本地文件资源
- Hive使用UDF一例
- Hive中UDF的使用
- 编写hive udf和使用hive udf:hue的hive界面中使用hive udf函数、oozie使用hive udf函数、hive命令行使用udf函数
- 编写hive udf和使用hive udf:hue的hive界面中使用hive udf函数、oozie使用hive udf函数、hive命令行使用udf函数
- #hive#HIVE中使用python实现UDF
- hive udf
- hive-udf
- hive UDF
- hive UDF
- hive UDF
- hive udf
- hive udf
- Hive UDF
- 选课网站
- 更改控制面板>硬件和声音>电源选项导致cpu温度很高
- 文章标题
- Java实验(2) Pi的近似值
- Java NIO Tutorial
- hive udf使用
- hmm 隐马尔可夫——代码应用
- oracle 域索引创建及维护
- 转载自http://blog.csdn.net/zhengzhihust/article/details/44151785
- android-设备信息工具类
- Vector和ArrayList的比较
- iOS之GIF动画文件的播放
- Android应用的闪退(crash)分析
- Java中long型转float型那点事