1. 程式人生 > >hive 動態分割槽 分割槽數太多出錯

hive 動態分割槽 分割槽數太多出錯

insert overwrite table lobehaviour_trade_daily partition (part) 
select dp_id, buyer_nick, to_date(created), payment, 0 as item, if(to_date(modified)<'2012-01-01','2012-01-01',to_date(modified)) as part
from taobao.s_trade_hbase 
where (part<'2013-10-30' or part='STABLE') and status='TRADE_FINISHED'
distribute by part;