add workflow 市场News-Agents调度,dev
This commit is contained in:
parent
a59c620930
commit
a21013abee
|
|
@ -17,13 +17,15 @@ CREATE TABLE IF NOT EXISTS p30_common.a_market_Intelligence_newsletter (
|
||||||
, source_url text
|
, source_url text
|
||||||
, news_date date
|
, news_date date
|
||||||
, create_tm timestamp(0)
|
, create_tm timestamp(0)
|
||||||
|
, data_source VARCHAR(255)
|
||||||
, Etl_Batch_No varchar(50)
|
, Etl_Batch_No varchar(50)
|
||||||
, Etl_First_Dt timestamp(0)
|
, Etl_First_Dt timestamp(0)
|
||||||
, Etl_Job varchar(200)
|
, Etl_Job varchar(200)
|
||||||
, Etl_Proc_Dt timestamp(0)
|
, Etl_Proc_Dt timestamp(0)
|
||||||
, Etl_Tx_Dt timestamp(0)
|
, Etl_Tx_Dt timestamp(0)
|
||||||
, Src_Sysname varchar(50)
|
, Src_Sysname varchar(50)
|
||||||
, Src_Table varchar(50)
|
, Src_Table varchar(50)
|
||||||
|
, business_type VARCHAR(255)
|
||||||
,primary key( id )
|
,primary key( id )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -43,6 +45,7 @@ CREATE TABLE IF NOT EXISTS p30_common.a_market_Intelligence_newsletter (
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.source_url IS '来源链接(URL)';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.source_url IS '来源链接(URL)';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.news_date IS '新闻日期';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.news_date IS '新闻日期';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.create_tm IS '采集入库时间';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.create_tm IS '采集入库时间';
|
||||||
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.data_source IS '数据来源';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_Batch_No IS '作业批次号';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_Batch_No IS '作业批次号';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_First_Dt IS '最初入库时间';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_First_Dt IS '最初入库时间';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_Job IS '作业名称';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_Job IS '作业名称';
|
||||||
|
|
@ -50,5 +53,6 @@ CREATE TABLE IF NOT EXISTS p30_common.a_market_Intelligence_newsletter (
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_Tx_Dt IS '作业运行时间';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Etl_Tx_Dt IS '作业运行时间';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Src_Sysname IS '来源系统';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Src_Sysname IS '来源系统';
|
||||||
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Src_Table IS '来源表';
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.Src_Table IS '来源表';
|
||||||
|
COMMENT ON COLUMN p30_common.a_market_Intelligence_newsletter.business_type IS '商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)';
|
||||||
|
|
||||||
COMMENT ON TABLE p30_common.a_market_Intelligence_newsletter IS '市场信息简报';
|
COMMENT ON TABLE p30_common.a_market_Intelligence_newsletter IS '市场信息简报';
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
/*Brilliance stems from wisdoms. */
|
/*Brilliance stems from wisdoms. */
|
||||||
/*************Head Section**************************************************************************/
|
/*************Head Section**************************************************************************/
|
||||||
/*Script Use: Periodically load data to :a_market_Intelligence_newsletter(市场信息简报) */
|
/*Script Use: Periodically load data to :a_market_Intelligence_newsletter(市场信息简报) */
|
||||||
/*Create Date:2025-12-09 18:42:38 */
|
/*Create Date:2025-12-26 10:45:43 */
|
||||||
/*SDM Developed By: dev */
|
/*SDM Developed By: dev */
|
||||||
/*SDM Developed Date: 2025-11-12 */
|
/*SDM Developed Date: 2025-11-12 */
|
||||||
/*SDM Checked By: dev */
|
/*SDM Checked By: dev */
|
||||||
/*SDM Checked Date: 2025-12-09 */
|
/*SDM Checked Date: 2025-12-26 */
|
||||||
/*Script Developed By: dev */
|
/*Script Developed By: dev */
|
||||||
/*Script Checked By: dev */
|
/*Script Checked By: dev */
|
||||||
/*Source table 1: p70_ai_intelligence.agent_market_summary */
|
/*Source table 1: p70_ai_intelligence.agent_market_summary */
|
||||||
|
|
@ -59,6 +59,7 @@ INSERT INTO a_market_Intelligence_newsletter_agi_CUR_I (
|
||||||
,source_url /*来源链接(URL)*/
|
,source_url /*来源链接(URL)*/
|
||||||
,news_date /*新闻日期*/
|
,news_date /*新闻日期*/
|
||||||
,create_tm /*采集入库时间*/
|
,create_tm /*采集入库时间*/
|
||||||
|
,data_source /*数据来源*/
|
||||||
,Etl_Batch_No /*作业批次号*/
|
,Etl_Batch_No /*作业批次号*/
|
||||||
,Etl_First_Dt /*最初入库时间*/
|
,Etl_First_Dt /*最初入库时间*/
|
||||||
,Etl_Job /*作业名称*/
|
,Etl_Job /*作业名称*/
|
||||||
|
|
@ -86,6 +87,7 @@ SELECT
|
||||||
,COALESCE(TRIM(p0.source_url),'') /*source_url*/
|
,COALESCE(TRIM(p0.source_url),'') /*source_url*/
|
||||||
,COALESCE(TO_DATE(CAST(p0.occur_date AS VARCHAR(10)),'YYYY-MM-DD'),TO_DATE(:NULLDATE,'YYYYMMDD')) /*news_date*/
|
,COALESCE(TO_DATE(CAST(p0.occur_date AS VARCHAR(10)),'YYYY-MM-DD'),TO_DATE(:NULLDATE,'YYYYMMDD')) /*news_date*/
|
||||||
,COALESCE(p0.create_tm,TO_TIMESTAMP(:NULLDATE,'YYYYMMDD')) /*create_tm*/
|
,COALESCE(p0.create_tm,TO_TIMESTAMP(:NULLDATE,'YYYYMMDD')) /*create_tm*/
|
||||||
|
,COALESCE(TRIM(p0.data_source),'') /*data_source*/
|
||||||
,0 /*Etl_Batch_No*/
|
,0 /*Etl_Batch_No*/
|
||||||
,TO_DATE(:TXDATE,'YYYYMMDD') /*Etl_First_Dt*/
|
,TO_DATE(:TXDATE,'YYYYMMDD') /*Etl_First_Dt*/
|
||||||
,:ETLJOB /*Etl_Job*/
|
,:ETLJOB /*Etl_Job*/
|
||||||
|
|
@ -119,6 +121,7 @@ where create_tm >=current_date - interval '7' day
|
||||||
,source_url /*来源链接(URL)*/
|
,source_url /*来源链接(URL)*/
|
||||||
,news_date /*新闻日期*/
|
,news_date /*新闻日期*/
|
||||||
,create_tm /*采集入库时间*/
|
,create_tm /*采集入库时间*/
|
||||||
|
,data_source /*数据来源*/
|
||||||
,business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
,business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
||||||
,id /*主键*/
|
,id /*主键*/
|
||||||
,Etl_Batch_No /*作业批次号*/
|
,Etl_Batch_No /*作业批次号*/
|
||||||
|
|
@ -146,6 +149,7 @@ where create_tm >=current_date - interval '7' day
|
||||||
,P1.source_url /*来源链接(URL)*/
|
,P1.source_url /*来源链接(URL)*/
|
||||||
,P1.news_date /*新闻日期*/
|
,P1.news_date /*新闻日期*/
|
||||||
,P1.create_tm /*采集入库时间*/
|
,P1.create_tm /*采集入库时间*/
|
||||||
|
,P1.data_source /*数据来源*/
|
||||||
,P1.business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
,P1.business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
||||||
,P1.id /*主键*/
|
,P1.id /*主键*/
|
||||||
,P1.Etl_Batch_No /*作业批次号*/
|
,P1.Etl_Batch_No /*作业批次号*/
|
||||||
|
|
@ -173,6 +177,7 @@ ON P1.newsletter_title = P2.newsletter_title
|
||||||
AND P1.source_url = P2.source_url
|
AND P1.source_url = P2.source_url
|
||||||
AND P1.news_date = P2.news_date
|
AND P1.news_date = P2.news_date
|
||||||
AND P1.create_tm = P2.create_tm
|
AND P1.create_tm = P2.create_tm
|
||||||
|
AND P1.data_source = P2.data_source
|
||||||
AND P1.business_type = P2.business_type
|
AND P1.business_type = P2.business_type
|
||||||
AND P1.id = P2.id
|
AND P1.id = P2.id
|
||||||
|
|
||||||
|
|
@ -191,6 +196,7 @@ WHERE P2.newsletter_title IS NULL
|
||||||
OR P2.source_url IS NULL
|
OR P2.source_url IS NULL
|
||||||
OR P2.news_date IS NULL
|
OR P2.news_date IS NULL
|
||||||
OR P2.create_tm IS NULL
|
OR P2.create_tm IS NULL
|
||||||
|
OR P2.data_source IS NULL
|
||||||
OR P2.business_type IS NULL
|
OR P2.business_type IS NULL
|
||||||
OR P2.id IS NULL
|
OR P2.id IS NULL
|
||||||
|
|
||||||
|
|
@ -212,6 +218,7 @@ WHERE P2.newsletter_title IS NULL
|
||||||
,source_url /*来源链接(URL)*/
|
,source_url /*来源链接(URL)*/
|
||||||
,news_date /*新闻日期*/
|
,news_date /*新闻日期*/
|
||||||
,create_tm /*采集入库时间*/
|
,create_tm /*采集入库时间*/
|
||||||
|
,data_source /*数据来源*/
|
||||||
,business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
,business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
||||||
,id /*主键*/
|
,id /*主键*/
|
||||||
,Etl_Batch_No /*作业批次号*/
|
,Etl_Batch_No /*作业批次号*/
|
||||||
|
|
@ -239,6 +246,7 @@ SELECT
|
||||||
,P1.source_url /*来源链接(URL)*/
|
,P1.source_url /*来源链接(URL)*/
|
||||||
,P1.news_date /*新闻日期*/
|
,P1.news_date /*新闻日期*/
|
||||||
,P1.create_tm /*采集入库时间*/
|
,P1.create_tm /*采集入库时间*/
|
||||||
|
,P1.data_source /*数据来源*/
|
||||||
,P1.business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
,P1.business_type /*商业活动类型(1-新项目,2-扩产,3-招聘,4-融资)*/
|
||||||
,P1.id /*主键*/
|
,P1.id /*主键*/
|
||||||
,P1.Etl_Batch_No /*作业批次号*/
|
,P1.Etl_Batch_No /*作业批次号*/
|
||||||
|
|
@ -268,6 +276,7 @@ DO UPDATE SET
|
||||||
,source_url=excluded.source_url
|
,source_url=excluded.source_url
|
||||||
,news_date=excluded.news_date
|
,news_date=excluded.news_date
|
||||||
,create_tm=excluded.create_tm
|
,create_tm=excluded.create_tm
|
||||||
|
,data_source=excluded.data_source
|
||||||
,business_type=excluded.business_type
|
,business_type=excluded.business_type
|
||||||
,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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue