時(shí)間列轉(zhuǎn)化&&動(dòng)態(tài)指定分區(qū)Insert數(shù)據(jù)
摘要: --使用 from_unixtime 和 unix_timestamp 將時(shí)間列轉(zhuǎn)化成想要的格式
--然后再Insert表,動(dòng)態(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;
閱讀全文