add workflow 招聘信息导入,dev
This commit is contained in:
parent
74b94b0880
commit
ff07fb0f00
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
DROP TABLE IF EXISTS p30_common.a_recruitment_intelligence;
|
||||
CREATE TABLE IF NOT EXISTS p30_common.a_recruitment_intelligence (
|
||||
id int4
|
||||
, company_name VARCHAR(255)
|
||||
, province VARCHAR(255)
|
||||
, city VARCHAR(255)
|
||||
, district VARCHAR(255)
|
||||
, create_tm timestamp(0)
|
||||
, remark text
|
||||
, Etl_Batch_No varchar(50)
|
||||
, Etl_First_Dt timestamp(0)
|
||||
, Etl_Job varchar(200)
|
||||
, Etl_Proc_Dt timestamp(0)
|
||||
, Etl_Tx_Dt timestamp(0)
|
||||
, Src_Sysname varchar(50)
|
||||
, Src_Table varchar(50)
|
||||
, insight text
|
||||
, title VARCHAR(255)
|
||||
, market_chance text
|
||||
,primary key( id )
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.id IS '主键';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.company_name IS '公司名称';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.province IS '省份名称';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.city IS '市名';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.district IS '区(县)';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.create_tm IS '采集时间';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.remark IS '其他备注';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Etl_Batch_No IS '作业批次号';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Etl_First_Dt IS '最初入库时间';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Etl_Job IS '作业名称';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Etl_Proc_Dt IS '本次入库时间';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Etl_Tx_Dt IS '作业运行时间';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Src_Sysname IS '来源系统';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.Src_Table IS '来源表';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.insight IS '招聘instght';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.title IS '标题';
|
||||
COMMENT ON COLUMN p30_common.a_recruitment_intelligence.market_chance IS '销售机会';
|
||||
|
||||
COMMENT ON TABLE p30_common.a_recruitment_intelligence IS '招聘信息汇总';
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/***************************************************************************************************/
|
||||
/*script in Sql, generate by SdmCreateScript 2024(by IdgValue, qihang.feng@idgvalue.COM) */
|
||||
/*VERSION 01.10 revised on 2020-08-25 */
|
||||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :a_recruitment_intelligence(招聘信息汇总) */
|
||||
/*Create Date:2026-02-27 10:37:18 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2025-11-13 */
|
||||
/*SDM Checked By: dev */
|
||||
/*SDM Checked Date: 2026-02-27 */
|
||||
/*Script Developed By: dev */
|
||||
/*Script Checked By: dev */
|
||||
/*Source table 1: p70_ai_intelligence.agent_recruitment_insight */
|
||||
/*Source table 2: :COMMDB.d_account_info */
|
||||
/*Job Type: Inbound transform (Tier 1 to Tier 2) */
|
||||
/*Target Table:a_recruitment_intelligence */
|
||||
/*ETL Job Name:a_recruitment_intelligence */
|
||||
/*ETL Frequency:None */
|
||||
/*ETL Policy:I */
|
||||
/********************************************************************************************/
|
||||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
|
||||
|
||||
|
||||
/*创建临时表加载当前数据 */
|
||||
CREATE TEMPORARY TABLE a_recruitment_intelligence_agi_CUR_I
|
||||
( LIKE :COMMDB.a_recruitment_intelligence)
|
||||
ON COMMIT PRESERVE ROWS;
|
||||
|
||||
|
||||
/*****************************************************************************************************/
|
||||
/* GROUP 1:Source Table:agent_recruitment_insight*****************************************************/
|
||||
/*****************************************************************************************************/
|
||||
INSERT INTO a_recruitment_intelligence_agi_CUR_I (
|
||||
id /*主键*/
|
||||
,company_name /*公司名称*/
|
||||
,province /*省份名称*/
|
||||
,city /*市名*/
|
||||
,district /*区(县)*/
|
||||
,create_tm /*采集时间*/
|
||||
,remark /*其他备注*/
|
||||
,Etl_Batch_No /*作业批次号*/
|
||||
,Etl_First_Dt /*最初入库时间*/
|
||||
,Etl_Job /*作业名称*/
|
||||
,Etl_Proc_Dt /*本次入库时间*/
|
||||
,Etl_Tx_Dt /*作业运行时间*/
|
||||
,Src_Sysname /*来源系统*/
|
||||
,Src_Table /*来源表*/
|
||||
,insight /*招聘instght*/
|
||||
,title /*标题*/
|
||||
,market_chance /*销售机会*/
|
||||
)
|
||||
SELECT
|
||||
COALESCE(p0.id,0) /*id*/
|
||||
,COALESCE(TRIM(p0.company),'') /*company_name*/
|
||||
,coalesce(p1.prov_name,'') /*province*/
|
||||
,coalesce(p1.city_name,'') /*city*/
|
||||
,coalesce(p1.district,'') /*district*/
|
||||
,COALESCE(p0.created_at,TO_TIMESTAMP(:NULLDATE,'YYYYMMDD')) /*create_tm*/
|
||||
,'' /*remark*/
|
||||
,0 /*Etl_Batch_No*/
|
||||
,TO_DATE(:TXDATE,'YYYYMMDD') /*Etl_First_Dt*/
|
||||
,:ETLJOB /*Etl_Job*/
|
||||
,current_timestamp(0) /*Etl_Proc_Dt*/
|
||||
,TO_DATE(:TXDATE,'YYYYMMDD') /*Etl_Tx_Dt*/
|
||||
,Substr('agent_recruitment_insight',1,3) /*Src_Sysname*/
|
||||
,'agent_recruitment_insight' /*Src_Table*/
|
||||
,COALESCE(TRIM(p0.insight),'') /*insight*/
|
||||
,COALESCE(TRIM(p0.title),'') /*title*/
|
||||
,COALESCE(TRIM(p0.market_chance),'') /*market_chance*/
|
||||
|
||||
FROM p70_ai_intelligence.agent_recruitment_insight p0
|
||||
LEFT JOIN :COMMDB.d_account_info P1
|
||||
ON p0.company =p1."name"
|
||||
;
|
||||
|
||||
|
||||
|
||||
INSERT INTO :COMMDB.a_recruitment_intelligence (
|
||||
company_name /*公司名称*/
|
||||
,province /*省份名称*/
|
||||
,city /*市名*/
|
||||
,district /*区(县)*/
|
||||
,create_tm /*采集时间*/
|
||||
,remark /*其他备注*/
|
||||
,insight /*招聘instght*/
|
||||
,title /*标题*/
|
||||
,market_chance /*销售机会*/
|
||||
,id /*主键*/
|
||||
,Etl_Batch_No /*作业批次号*/
|
||||
,Etl_First_Dt /*最初入库时间*/
|
||||
,Etl_Job /*作业名称*/
|
||||
,Etl_Proc_Dt /*本次入库时间*/
|
||||
,Etl_Tx_Dt /*作业运行时间*/
|
||||
,Src_Sysname /*来源系统*/
|
||||
,Src_Table /*来源表*/
|
||||
|
||||
)
|
||||
SELECT
|
||||
P1.company_name /*公司名称*/
|
||||
,P1.province /*省份名称*/
|
||||
,P1.city /*市名*/
|
||||
,P1.district /*区(县)*/
|
||||
,P1.create_tm /*采集时间*/
|
||||
,P1.remark /*其他备注*/
|
||||
,P1.insight /*招聘instght*/
|
||||
,P1.title /*标题*/
|
||||
,P1.market_chance /*销售机会*/
|
||||
,P1.id /*主键*/
|
||||
,P1.Etl_Batch_No /*作业批次号*/
|
||||
,P1.Etl_First_Dt /*最初入库时间*/
|
||||
,P1.Etl_Job /*作业名称*/
|
||||
,P1.Etl_Proc_Dt /*本次入库时间*/
|
||||
,P1.Etl_Tx_Dt /*作业运行时间*/
|
||||
,P1.Src_Sysname /*来源系统*/
|
||||
,P1.Src_Table /*来源表*/
|
||||
|
||||
FROM a_recruitment_intelligence_agi_CUR_I P1;
|
||||
|
||||
;
|
||||
/*****程序结束退出 */
|
||||
\q
|
||||
|
||||
Loading…
Reference in New Issue