add workflow 泰克客户,dev

This commit is contained in:
root 2024-05-10 16:43:00 +08:00
parent 454a9b3123
commit c1aa32cc63
2 changed files with 13 additions and 3 deletions

View File

@ -4,7 +4,7 @@
/*Brilliance stems from wisdoms. */ /*Brilliance stems from wisdoms. */
/*************Head Section**************************************************************************/ /*************Head Section**************************************************************************/
/*Script Use: Periodically load data to :t01_crm_raw_leads(CRM原始线索) */ /*Script Use: Periodically load data to :t01_crm_raw_leads(CRM原始线索) */
/*Create Date:2024-05-10 16:39:49 */ /*Create Date:2024-05-10 16:42:38 */
/*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 */
@ -69,7 +69,7 @@ SELECT
,COALESCE(TRIM(CAST(p0.companyname AS varchar(50))),'') /*company_name*/ ,COALESCE(TRIM(CAST(p0.companyname AS varchar(50))),'') /*company_name*/
,COALESCE(TRIM(CAST(p0.emailaddress1 AS varchar(50))),'') /*email*/ ,COALESCE(TRIM(CAST(p0.emailaddress1 AS varchar(50))),'') /*email*/
,COALESCE(TRIM(CAST(p0.mobilephone AS varchar(20))),'') /*mobile_phone*/ ,COALESCE(TRIM(CAST(p0.mobilephone AS varchar(20))),'') /*mobile_phone*/
,case when p0.tek_mqldate = 'NULL' THEN TO_TIMESTAMP('19000102','YYYYMMDD') ELSE COALESCE(TO_TIMESTAMP(CAST(p0.tek_mqldate AS VARCHAR(19)),'MM/DD/YYYY HH24:mi'),TO_TIMESTAMP('19000102','YYYYMMDD')) END /*mql_time*/ ,case when p0.tek_mqldate = 'NULL' THEN TO_TIMESTAMP('19000102','YYYYMMDD') ELSE COALESCE(TO_TIMESTAMP(CAST(p0.tek_mqldate AS VARCHAR(19)),'YYYY/MM/DD HH24:mi:ss'),TO_TIMESTAMP('19000102','YYYYMMDD')) END /*mql_time*/
,COALESCE(TRIM(CAST(p0.campaignidname AS varchar(50))),'') /*campaign_name*/ ,COALESCE(TRIM(CAST(p0.campaignidname AS varchar(50))),'') /*campaign_name*/
,COALESCE(TRIM(CAST(p0.tek_industry2idname AS varchar(20))),'') /*industry*/ ,COALESCE(TRIM(CAST(p0.tek_industry2idname AS varchar(20))),'') /*industry*/
,COALESCE(TRIM(CAST(p0.tek_marketing_program_type_idname AS varchar(20))),'') /*market_type*/ ,COALESCE(TRIM(CAST(p0.tek_marketing_program_type_idname AS varchar(20))),'') /*market_type*/

View File

@ -212,6 +212,14 @@ params={'my_param':"cust_contact_info_agi"},
depends_on_past=False, depends_on_past=False,
retries=3, retries=3,
dag=dag) dag=dag)
cust_all_info = SSHOperator(
ssh_hook=sshHook,
task_id='cust_all_info',
command='/data/airflow/etl/MART/run_psql.sh {{ ds_nodash }} {{params.my_param}} >>/data/airflow/logs/run_tpt_{{ds_nodash}}.log 2>&1 ',
params={'my_param':"cust_all_info_agi"},
depends_on_past=False,
retries=3,
dag=dag)
file_Tk01 >> livechat_6381 file_Tk01 >> livechat_6381
file_Udesk_record >> udesk_record_3768 file_Udesk_record >> udesk_record_3768
file_CRM_Raw_Leads >> crm_raw_leads_6024 file_CRM_Raw_Leads >> crm_raw_leads_6024
@ -231,4 +239,6 @@ cust_contact_mapping >> cust_leads
t01_crm_raw_leads >> cust_leads t01_crm_raw_leads >> cust_leads
t00_china_city_info >> cust_contact_info t00_china_city_info >> cust_contact_info
t00_country_info >> cust_contact_info t00_country_info >> cust_contact_info
cust_contact_info >> task_failed cust_leads >> cust_all_info
cust_contact_info >> cust_all_info
cust_all_info >> task_failed