21. Save hive to hive binding table according to the calculated statistics

Creating upflow table

create external table mydb2.upflow (ip string,sum string) row format delimited fields terminated by ',';

 

 

 select ip,sum(upflow) as sum from mydb2.access group by ip order by sum desc;

 

 

 

The access table inside the content into upflow table

insert into  mydb2.upflow  select ip,sum(upflow) as sum from mydb2.access group by ip order by sum desc;

 

 

 

 

Guess you like

Origin www.cnblogs.com/braveym/p/11408671.html