時間列轉(zhuǎn)化&&動態(tài)指定分區(qū)Insert數(shù)據(jù)
摘要: --使用 from_unixtime 和 unix_timestamp 將時間列轉(zhuǎn)化成想要的格式
--然后再Insert表,動態(tài)指定分區(qū)
insert overwrite table partition_user_table partition (dt) select id, account, name, create_time, from_unixtime(unix_timestamp(create_time,'yyyy/mm/dd'),'yyyymmdd') as dt from external_user_table;
閱讀全文
posted @
2018-04-02 16:47 Ke 閱讀(547) |
評論 (0) 編輯