https://community.cloudera.com/t5/Support-Questions/How-to-create-partitions-on-existing-Hive-table/td-p/241684
CREATE TABLE lkml.lk_opr_ar_model_monitor_xbsp_auditcode_log_pt
(
RISKCODE STRING,
CNT BIGINT
)
PARTITIONED BY (DT STRING);
insert overwrite table lkml.lk_opr_ar_model_monitor_xbsp_auditcode_log_pt partition(dt)
select riskcode,cnt,dt
from lkml.lk_opr_ar_model_monitor_xbsp_auditcode_log
--distribute by dt --这里可以不写distribute by
网友评论