drop table if exists ccs_table;
create table if not exists ccs_table
(id string comment '客戶號‘,
data_date string comment '數據日期’)
partitioned by (data_dt string);
插入內容到 ccs_table
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.optimize.index.filter=false;
set tez.quence.name=api_ccs;
insert overwrite table ccs_table partition (data_dt =‘2020-06-02’)
select id,‘2020-06-02’ as data_date
from ccs_bdp_table_b(把內容存儲爲一個臨時表,檢查完畢後插入到上述ccs_table正式表)