插入sql
insert into a003_a.ds_detail_discounts select shop_id
,olet_id
,bday_date
,chks_id
,citm_id
,cdit_citm_id
,name_level_1
,name_level_0
,cdis_id
,cdis_name_l1
,cdis_name1
,enterprisecurrency666_cdis_total
,propertycurrency666_cdis_total
,enterprisecurrency666_cdit_round_total
,propertycurrency666_cdit_round_total
,enterprisecurrency666_abs_cdit_round_total
,propertycurrency666_abs_cdit_round_total
,cdit_count
,cdis_count
,cdis_dtyp_id
,chks_check_prefix_num
,chks_open_loctime
,chks_open_user_id
,chks_print_count
,propertycurrency666_chks_check_total
,enterprisecurrency666_chks_check_total
,chks_non_revenue
,shop_name_l1
,olet_name_l1
,check_emplyee
,bper_name
,pdtp_name_l1
,pdtp_seq
,cdis_status
,chks_status
,bday_end_loctime
,bday_status
,discount_classfiy
,dtyp_rate
,citm_name
,citm_code
,order_type
,cdis_apply_loctime
,cdis_apply_time
,cdis_apply_user_id
,cdis_apply_user_name
,tenant_id
,if(ab_partition
= ‘hot’,2,0) as ab_partition
from hive_ext.a003_ds_detail_discounts where bday_date
>= ‘2022-08-20’