add workflow 市场易API联系人,dev

This commit is contained in:
root 2026-02-09 10:46:39 +08:00
parent 336e31aa55
commit 3e19825c15
1 changed files with 12 additions and 12 deletions

View File

@ -4,11 +4,11 @@
/*Brilliance stems from wisdoms. */ /*Brilliance stems from wisdoms. */
/*************Head Section**************************************************************************/ /*************Head Section**************************************************************************/
/*Script Use: Periodically load data to :t01_scrm_leads(SCRM线索) */ /*Script Use: Periodically load data to :t01_scrm_leads(SCRM线索) */
/*Create Date:2025-10-30 11:07:00 */ /*Create Date:2026-02-09 10:46:12 */
/*SDM Developed By: dev */ /*SDM Developed By: dev */
/*SDM Developed Date: 2024-01-12 */ /*SDM Developed Date: 2024-01-12 */
/*SDM Checked By: dev */ /*SDM Checked By: dev */
/*SDM Checked Date: 2025-10-30 */ /*SDM Checked Date: 2026-02-09 */
/*Script Developed By: dev */ /*Script Developed By: dev */
/*Script Checked By: dev */ /*Script Checked By: dev */
/*Source table 1: :PDMDB.(SELECT /*Source table 1: :PDMDB.(SELECT
@ -84,7 +84,7 @@ SELECT
,COALESCE(TRIM(CAST(p0.source AS varchar(50))),'') /*source*/ ,COALESCE(TRIM(CAST(p0.source AS varchar(50))),'') /*source*/
,COALESCE(TRIM(CAST(p0.tag AS varchar(30))),'') /*tag*/ ,COALESCE(TRIM(CAST(p0.tag AS varchar(30))),'') /*tag*/
,COALESCE(TRIM(CAST(p0.c_keyword AS varchar(30))),'') /*c_keyword*/ ,COALESCE(TRIM(CAST(p0.c_keyword AS varchar(30))),'') /*c_keyword*/
,COALESCE(TRIM(CAST(p0.attr2 AS varchar(30))),'') /*attr2*/ ,COALESCE(TRIM(p0.attr2),'') /*attr2*/
,COALESCE(TRIM(CAST(p0.label AS varchar(30))),'') /*label*/ ,COALESCE(TRIM(CAST(p0.label AS varchar(30))),'') /*label*/
,COALESCE(TRIM(CAST(p0.group_label AS varchar(30))),'') /*group_label*/ ,COALESCE(TRIM(CAST(p0.group_label AS varchar(30))),'') /*group_label*/
,0 /*Etl_Batch_No*/ ,0 /*Etl_Batch_No*/
@ -189,10 +189,10 @@ group by p0 .contact_id ,p0 .properties ,p0.at,p0 .connect_name,p0 .meta_remark
,source /*source*/ ,source /*source*/
,tag /*tag*/ ,tag /*tag*/
,c_keyword /*c_keyword*/ ,c_keyword /*c_keyword*/
,attr2 /*attr2*/
,group_label /*groupLabel*/ ,group_label /*groupLabel*/
,customer_id /*customerId*/ ,customer_id /*customerId*/
,date /*date*/ ,date /*date*/
,attr2 /*attr2*/
,label /*label*/ ,label /*label*/
,Etl_Batch_No /*作业批次号*/ ,Etl_Batch_No /*作业批次号*/
,Etl_First_Dt /*最初入库时间*/ ,Etl_First_Dt /*最初入库时间*/
@ -211,10 +211,10 @@ group by p0 .contact_id ,p0 .properties ,p0.at,p0 .connect_name,p0 .meta_remark
,P1.source /*source*/ ,P1.source /*source*/
,P1.tag /*tag*/ ,P1.tag /*tag*/
,P1.c_keyword /*c_keyword*/ ,P1.c_keyword /*c_keyword*/
,P1.attr2 /*attr2*/
,P1.group_label /*groupLabel*/ ,P1.group_label /*groupLabel*/
,P1.customer_id /*customerId*/ ,P1.customer_id /*customerId*/
,P1.date /*date*/ ,P1.date /*date*/
,P1.attr2 /*attr2*/
,P1.label /*label*/ ,P1.label /*label*/
,P1.Etl_Batch_No /*作业批次号*/ ,P1.Etl_Batch_No /*作业批次号*/
,P1.Etl_First_Dt /*最初入库时间*/ ,P1.Etl_First_Dt /*最初入库时间*/
@ -233,10 +233,10 @@ ON P1.target_name = P2.target_name
AND P1.source = P2.source AND P1.source = P2.source
AND P1.tag = P2.tag AND P1.tag = P2.tag
AND P1.c_keyword = P2.c_keyword AND P1.c_keyword = P2.c_keyword
AND P1.attr2 = P2.attr2
AND P1.group_label = P2.group_label AND P1.group_label = P2.group_label
AND P1.customer_id = P2.customer_id AND P1.customer_id = P2.customer_id
AND P1.date = P2.date AND P1.date = P2.date
AND P1.attr2 = P2.attr2
AND P1.label = P2.label AND P1.label = P2.label
WHERE P2.target_name IS NULL WHERE P2.target_name IS NULL
@ -246,10 +246,10 @@ WHERE P2.target_name IS NULL
OR P2.source IS NULL OR P2.source IS NULL
OR P2.tag IS NULL OR P2.tag IS NULL
OR P2.c_keyword IS NULL OR P2.c_keyword IS NULL
OR P2.attr2 IS NULL
OR P2.group_label IS NULL OR P2.group_label IS NULL
OR P2.customer_id IS NULL OR P2.customer_id IS NULL
OR P2.date IS NULL OR P2.date IS NULL
OR P2.attr2 IS NULL
OR P2.label IS NULL OR P2.label IS NULL
; ;
@ -262,10 +262,10 @@ WHERE P2.target_name IS NULL
,source /*source*/ ,source /*source*/
,tag /*tag*/ ,tag /*tag*/
,c_keyword /*c_keyword*/ ,c_keyword /*c_keyword*/
,attr2 /*attr2*/
,group_label /*groupLabel*/ ,group_label /*groupLabel*/
,customer_id /*customerId*/ ,customer_id /*customerId*/
,date /*date*/ ,date /*date*/
,attr2 /*attr2*/
,label /*label*/ ,label /*label*/
,Etl_Batch_No /*作业批次号*/ ,Etl_Batch_No /*作业批次号*/
,Etl_First_Dt /*最初入库时间*/ ,Etl_First_Dt /*最初入库时间*/
@ -284,10 +284,10 @@ SELECT
,P1.source /*source*/ ,P1.source /*source*/
,P1.tag /*tag*/ ,P1.tag /*tag*/
,P1.c_keyword /*c_keyword*/ ,P1.c_keyword /*c_keyword*/
,P1.attr2 /*attr2*/
,P1.group_label /*groupLabel*/ ,P1.group_label /*groupLabel*/
,P1.customer_id /*customerId*/ ,P1.customer_id /*customerId*/
,P1.date /*date*/ ,P1.date /*date*/
,P1.attr2 /*attr2*/
,P1.label /*label*/ ,P1.label /*label*/
,P1.Etl_Batch_No /*作业批次号*/ ,P1.Etl_Batch_No /*作业批次号*/
,P1.Etl_First_Dt /*最初入库时间*/ ,P1.Etl_First_Dt /*最初入库时间*/
@ -298,10 +298,11 @@ SELECT
,P1.Src_Table /*来源表*/ ,P1.Src_Table /*来源表*/
FROM t01_scrm_leads_agi_INS P1 FROM t01_scrm_leads_agi_INS P1
ON CONFLICT ( customer_id,date,label) ON CONFLICT ( customer_id,date,attr2,label)
DO UPDATE SET DO UPDATE SET
customer_id=excluded.customer_id customer_id=excluded.customer_id
,date=excluded.date ,date=excluded.date
,attr2=excluded.attr2
,label=excluded.label ,label=excluded.label
,target_name=excluded.target_name ,target_name=excluded.target_name
,c_name=excluded.c_name ,c_name=excluded.c_name
@ -310,7 +311,6 @@ DO UPDATE SET
,source=excluded.source ,source=excluded.source
,tag=excluded.tag ,tag=excluded.tag
,c_keyword=excluded.c_keyword ,c_keyword=excluded.c_keyword
,attr2=excluded.attr2
,group_label=excluded.group_label ,group_label=excluded.group_label
,Etl_Batch_No=excluded.Etl_Batch_No ,Etl_Batch_No=excluded.Etl_Batch_No
,Etl_First_Dt=excluded.Etl_First_Dt ,Etl_First_Dt=excluded.Etl_First_Dt