Hive code

 

hive 

create table temp1(text line string);

load data local inpath 'home/cloudera/Desktop/TestWC.txt'into table temp1;

select * from temp1;

Describe temp1;

create table output as select word,COUNT(*)from temp1 LATERAL VIEW explode(split(text_line,' '))ltable as word group by word;

select * from output; 




Comments

Popular posts from this blog

When it is necessary for your small business to invest in branding vs marketing ?