记录一个hive清空外部表数据的办法


insert overwrite table access select * from access where ip =0;

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

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

sqoop export --connect jdbc:mysql://hadoop2:3306/userdb --username sqoop --password sqoop --table upflow --export-dir /usr/local/software/hive/warehouse/mydb2.db/upflow --input-fields-terminated-by ','


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM