创建hive数据仓库:
create table docs(line string);
从hdfs上传文件到数据库:
load data inpath 'file:///usr/local/hadoop/input' overwrite into table docs;
根据词汇查询词汇数量:
create table word_count as select word, count(1) as count from (select explode(split(line,' '))as word from docs) w group by word order by word;
标签:count,常用,word,HiveQL,docs,Hive,table,select From: https://www.cnblogs.com/JJTyyds/p/17770941.html