词频统计 #创建表,只有一列,列名line create table word_count ( line string) row format delimited fields terminated by '\t' lines terminated by '\n'; #导入一篇文章到表里 load data local inpath '/home/dip/test/word_count.txt' #词频统计 select word ,count(*) as cnt from (select explode(split(line ,' ')) as word from word_count)t1 group by word order by cnt desc;
hive学习01词频统计
猜你喜欢
转载自www.cnblogs.com/students/p/10341363.html
今日推荐
周排行