INSERT INTO ecisdrdm.bnft_curr_fact AS prod (bnft_fact_id, bene_cntry_of_brth_id, bene_cntry_of_rsdc_id,
bene_cntry_of_ctznshp_id, frm_id, svc_ctr_id, actn_dt_in_id, actn_tm_in_id, src_sys_id,
bnft_hist_actn_id, bene_id, bene_end_dt_id, petnr_app_id, atty_id, uscis_emp_id, application_id,
rmtr_id, prpr_id, mig_filename)
SELECT stg.bnft_fact_id, stg.bene_cntry_of_brth_id, stg.bene_cntry_of_rsdc_id,
stg.bene_cntry_of_ctznshp_id, stg.frm_id, stg.svc_ctr_id, stg.actn_dt_in_id, stg.actn_tm_in_id, stg.src_sys_id,
stg.bnft_hist_actn_id, stg.bene_id, stg.bene_end_dt_id, stg.petnr_app_id, stg.atty_id, stg.uscis_emp_id, stg.application_id,
stg.rmtr_id, stg.prpr_id, stg.mig_filename
FROM ecisdrdm.stg_bnft_curr_fact stg
ON CONFLICT ("bnft_fact_id") DO UPDATE
SET (bnft_fact_id, bene_cntry_of_brth_id, bene_cntry_of_rsdc_id,