text = text.replace(/'202[0-9]{3}'/g, '${yyyyMM}'); text = text.replace(/'202[0-9]{5}'/g, '${yyyyMMdd}'); text = text.replace(/::int8/g, ''); text = text.replace(/::varchar/g, ''); text = text.replace(/::text/g, ''); text = text.replace(/::numeric/g, ''); text = text.replace(/::date/g, ''); text = text.replace(/::timestamp/g, ''); text = text.replace(/jyh_yb_crm_offer_iu/g, 'hi_dim_dc.dim_crm_offer_iu'); text = text.replace(/v_jyh_yb_offer_pzb/g, 'hi_yibin.jyh_yb_offer_pzb'); text = text.replace(/v_jyh_yb_z_staff/g, 'hi_yibin.jyh_yb_staff'); text = text.replace(/v_jyh_yb_jh_/g, 'hi_crm_ywjh.jyh_yb_jh_'); text = text.replace(/v_jyh_yb_g_offer_acct/g, 'hi_yibin.jyh_yb_g_offer_acct'); text = text.replace(/join\s(select\scust_id,\scust_name\sfrom\sjyh_yb_all_product)\sk\son\sa.belong_cust_id\s=\sk.cust_id/g, 'join (select cust_id, cust_name from hi_dwd_dc.DWD_PTY_IBSS_CUST_D where DATE_NO_ = ${yyyyMMdd}) k on a.belong_cust_id = k.cust_id'); text = text.replace(/current_date-1/g, 'date_add(current_date, -1)'); text = text.replace(/current_date-7/g, 'date_add(current_date, -7)'); text = text.replace(/current_date-30/g, 'date_add(current_date, -30)'); text = text.replace(/current_date-90/g, 'date_add(current_date, -90)'); text = text.replace(/v_jyh_yb_offer_attr/g, 'hi_dwd_dc.dwd_prd_offer_inst_attr_d'); |