HIVE 資料同步

yang1721發表於2016-08-23
現在需要從本地的hadoop叢集HIVE庫導資料到現網,步驟如下
1) 本地HIVE資料匯出檔案
insert overwrite  local directory '/u01/sp/ods_ho_click_log'    row format delimited fields terminated by '\t' select * from ods_ho_click_log where pt='20160819';

2) 本地的檔案上傳到現網目錄/home/hadoop/sp/ods_ho_click_log
3)  現網檔案載入
load data local inpath '/home/hadoop/sp/ods_ho_click_log/000000_0' overwrite into table ods_ho_click_log partition(pt='20160819');

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16674653/viewspace-2123836/,如需轉載,請註明出處,否則將追究法律責任。

相關文章