【hive 数据查询下载】hue UDF 使用方法以及下载数据到服务器

在服务器端有个com.dsj361.hive.udf.FilterHtmlUdf,如何使用呢、

--评论
create temporary function filter_html as 'com.dsj361.hive.udf.FilterHtmlUdf';

insert overwrite table tempon.tl_dongli_comment_content
select filter_html(content) from dw.bl_comment_detail where app_id='kk' group by content
select * from tempon.tl_dongli_comment_content


--回复

create temporary function filter_html as 'com.dsj361.hive.udf.FilterHtmlUdf';

insert overwrite table tempon.tl_dongli_reply_content
select filter_html(content) from dw.bl_reply_detail where app_id='kk' group by content

select * from tempon.tl_dongli_reply_content


--微博

create temporary function filter_html as 'com.dsj361.hive.udf.FilterHtmlUdf';

insert overwrite table tempon.tl_dongli_weibo_content

select filter_html(content) from dw.bl_weibo_detail  where content is not null and content!=''  and app_id='kk'  group by content

select * from tempon.tl_dongli_weibo_content



--下载数据

hdfs dfs -getmerge /user/hive/warehouse/tempon.db/tl_dongli_comment_content/*   /home/admin/test/dongli/tl_dongli_comment_content.txt

hdfs dfs -getmerge /user/hive/warehouse/tempon.db/tl_dongli_reply_content/*   /home/admin/test/dongli/tl_dongli_reply_content.txt

hdfs dfs -getmerge /user/hive/warehouse/tempon.db/tl_dongli_weibo_content/*   /home/admin/test/dongli/tl_dongli_weibo_content.txt
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页