add workflow 天润dynamic邮件同步,dev

This commit is contained in:
root 2024-11-13 14:26:04 +08:00
parent 2309a6e0a0
commit df66233715
1 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ SELECT
,coalesce(p2.prov_name,'') /*STATE_COUNTY_LOCATION*/ ,coalesce(p2.prov_name,'') /*STATE_COUNTY_LOCATION*/
,'CN' /*COUNTRY_CODE*/ ,'CN' /*COUNTRY_CODE*/
,coalesce(p2.postalcode,'') /*POSTAL_CODE*/ ,coalesce(p2.postalcode,'') /*POSTAL_CODE*/
,coalesce(find_first_phone_number(replace(replace(replace(COALESCE(p1.tel,''),'"',''),'[','{'),']','}')::text[]),find_first_not_phone_number(replace(replace(replace(p1.tel,'"',''),'[','{'),']','}')::text[]),'null') /*CONTACT_MOBILE_NUMBER*/ ,coalesce(find_first_phone_number(replace(replace(replace(COALESCE(p1.tel,'{}'),'"',''),'[','{'),']','}')::text[]),find_first_not_phone_number(replace(replace(replace(p1.tel,'"',''),'[','{'),']','}')::text[]),'null') /*CONTACT_MOBILE_NUMBER*/
,coalesce(p1.email,'') /*EMAIL_ADDRESS*/ ,coalesce(p1.email,'') /*EMAIL_ADDRESS*/
,'YES' /*REQUEST_A_DEMO*/ ,'YES' /*REQUEST_A_DEMO*/
,'YES' /*REQUEST_A_QUOTE*/ ,'YES' /*REQUEST_A_QUOTE*/
@ -200,8 +200,8 @@ WHERE jsonb_extract_path_text(field, 'id')::int = 299137),'') /*LEAD_PROD
,TO_DATE(:TXDATE,'YYYYMMDD') /*Etl_First_Dt*/ ,TO_DATE(:TXDATE,'YYYYMMDD') /*Etl_First_Dt*/
,current_timestamp(0) /*Etl_Proc_Dt*/ ,current_timestamp(0) /*Etl_Proc_Dt*/
,0 /*Etl_Batch_No*/ ,0 /*Etl_Batch_No*/
,case when cardinality(array_remove(replace(replace(replace(p1.tel,'"',''),'[','{'),']','}')::text[],find_first_phone_number(replace(replace(replace(COALESCE(p1.tel,''),'"',''),'[','{'),']','}')::text[])))=0 then '' ,case when cardinality(array_remove(replace(replace(replace(p1.tel,'"',''),'[','{'),']','}')::text[],find_first_phone_number(replace(replace(replace(COALESCE(p1.tel,'{}'),'"',''),'[','{'),']','}')::text[])))=0 then ''
else find_first_phone_number(array_remove(replace(replace(replace(COALESCE(p1.tel,''),'"',''),'[','{'),']','}')::text[],find_first_phone_number(replace(replace(replace(COALESCE(p1.tel,''),'"',''),'[','{'),']','}')::text[]))) else find_first_phone_number(array_remove(replace(replace(replace(COALESCE(p1.tel,'{}'),'"',''),'[','{'),']','}')::text[],find_first_phone_number(replace(replace(replace(COALESCE(p1.tel,'{}'),'"',''),'[','{'),']','}')::text[])))
end /*second_mobile_number*/ end /*second_mobile_number*/
,coalesce(find_first_not_phone_number(replace(replace(replace(p1.tel,'"',''),'[','{'),']','}')::text[]),'') /*company_phone_number*/ ,coalesce(find_first_not_phone_number(replace(replace(replace(p1.tel,'"',''),'[','{'),']','}')::text[]),'') /*company_phone_number*/