创建表:

create table hive_wordcount(context string);
load data local inpath '/home/hadoop/files/helloworld.txt' into table hive_wordcount;

执行查询SQL:

select word, count(*) from hive_wordcount lateral view explode(split(context,'\t')) wc as word group by word;

 

相关文章:

  • 2021-08-23
  • 2021-11-11
  • 2021-07-20
  • 2022-12-23
  • 2021-07-11
  • 2021-04-09
  • 2022-01-06
猜你喜欢
  • 2021-09-24
  • 2021-07-30
  • 2021-06-23
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案