add workflow 天润Smart-ccc通话记录,dev
This commit is contained in:
parent
aa9a7fc1f7
commit
41c8141dde
|
@ -0,0 +1,102 @@
|
|||
|
||||
DROP TABLE IF EXISTS p20_pdm.t01_ccc_ib_record;
|
||||
CREATE TABLE IF NOT EXISTS p20_pdm.t01_ccc_ib_record (
|
||||
ib_unique_id varchar(50)
|
||||
, call_id varchar(50)
|
||||
, customer_number varchar(20)
|
||||
, customer_number_encrypt varchar(50)
|
||||
, customer_province varchar(20)
|
||||
, customer_city varchar(20)
|
||||
, first_call_number varchar(20)
|
||||
, first_call_cno varchar(20)
|
||||
, first_call_cname varchar(20)
|
||||
, first_call_qno varchar(20)
|
||||
, first_call_qname varchar(20)
|
||||
, ivr_name varchar(20)
|
||||
, hotline varchar(20)
|
||||
, hotline_name varchar(20)
|
||||
, xnumber varchar(20)
|
||||
, ib_status varchar(20)
|
||||
, ib_result varchar(20)
|
||||
, status_robot varchar(20)
|
||||
, ib_tag varchar(20)
|
||||
, webrtc_call_id varchar(50)
|
||||
, sip_cause_desc varchar(50)
|
||||
, call_type varchar(10)
|
||||
, record_file text
|
||||
, on_hook_source varchar(20)
|
||||
, investigation_keys varchar(20)
|
||||
, agent_answer_in_time varchar(20)
|
||||
, evaluation varchar(20)
|
||||
, user_field text
|
||||
, start_time timestamp(0)
|
||||
, ring_time timestamp(0)
|
||||
, ib_ringing_duration int
|
||||
, end_time timestamp(0)
|
||||
, answer_time timestamp(0)
|
||||
, offhook_time timestamp(0)
|
||||
, bridge_time timestamp(0)
|
||||
, bridge_duration int
|
||||
, total_duration int
|
||||
, first_join_queue_time timestamp(0)
|
||||
, say_voice_duration int
|
||||
, mark_data text
|
||||
, 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)
|
||||
, Etl_Batch_No varchar(50)
|
||||
,primary key( ib_unique_id )
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ib_unique_id IS '呼入通话ID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.call_id IS 'CallID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.customer_number IS '客户号码';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.customer_number_encrypt IS '客户号码加密串';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.customer_province IS '客户省份';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.customer_city IS '客户城市';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.first_call_number IS '首呼座席电话';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.first_call_cno IS '首呼座席工号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.first_call_cname IS '首呼座席姓名';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.first_call_qno IS '首呼队列号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.first_call_qname IS '首呼队列名称';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ivr_name IS 'IVR名称';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.hotline IS '热线号码';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.hotline_name IS '热线别名';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.xnumber IS '虚拟号码';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ib_status IS '接听状态';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ib_result IS '呼叫结果';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.status_robot IS '机器人接听状态';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ib_tag IS '通话标签';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.webrtc_call_id IS 'WebRTCCallID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.sip_cause_desc IS '呼叫情况';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.call_type IS '呼叫类型';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.record_file IS '录音文件';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.on_hook_source IS '挂断方';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.investigation_keys IS '满意度评价';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.agent_answer_in_time IS '首次及时应答';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.evaluation IS '是否邀评';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.user_field IS '自定义字段';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.start_time IS '开始时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ring_time IS '振铃时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.ib_ringing_duration IS '振铃时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.end_time IS '结束时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.answer_time IS '接听时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.offhook_time IS '座席接起时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.bridge_time IS '首次接听时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.bridge_duration IS '通话时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.total_duration IS '总时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.first_join_queue_time IS '首次进入队列时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.say_voice_duration IS '语音播报时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.mark_data IS '备注';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Etl_First_Dt IS '最初入库时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Etl_Job IS '作业名称';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Etl_Proc_Dt IS '本次入库时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Etl_Tx_Dt IS '作业运行时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Src_Sysname IS '来源系统';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Src_Table IS '来源表';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ib_record.Etl_Batch_No IS '作业批次号';
|
||||
|
||||
COMMENT ON TABLE p20_pdm.t01_ccc_ib_record IS 'smartccc呼入记录';
|
|
@ -0,0 +1,380 @@
|
|||
/***************************************************************************************************/
|
||||
/*script in Sql, generate by SdmCreateScript 2020(by Qihang Feng, QF255001@TERADATA.COM) */
|
||||
/*VERSION 01.10 revised on 2020-08-25 */
|
||||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :t01_ccc_ib_record(smartccc呼入记录) */
|
||||
/*Create Date:2024-07-19 14:31:48 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2024-07-19 */
|
||||
/*SDM Checked By: dev */
|
||||
/*SDM Checked Date: 2024-07-19 */
|
||||
/*Script Developed By: dev */
|
||||
/*Script Checked By: dev */
|
||||
/*Job Type: Inbound transform (Tier 1 to Tier 2) */
|
||||
/*Target Table:t01_ccc_ib_record */
|
||||
/*ETL Job Name:t01_ccc_ib_record */
|
||||
/*ETL Frequency:Daily */
|
||||
/*ETL Policy:F2 */
|
||||
/********************************************************************************************/
|
||||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
|
||||
|
||||
|
||||
/*创建临时表加载当前数据 */
|
||||
CREATE TEMPORARY TABLE t01_ccc_ib_record_agi_CUR_I
|
||||
( LIKE :PDMDB.t01_ccc_ib_record)
|
||||
ON COMMIT PRESERVE ROWS;
|
||||
|
||||
|
||||
|
||||
/*创建临时表加载不同数据 */
|
||||
CREATE TEMPORARY TABLE t01_ccc_ib_record_agi_INS
|
||||
( LIKE :PDMDB.t01_ccc_ib_record)
|
||||
ON COMMIT PRESERVE ROWS;
|
||||
|
||||
|
||||
/*将不同数据插入到临时表 */
|
||||
;INSERT INTO t01_ccc_ib_record_agi_INS (
|
||||
call_id /*CallID*/
|
||||
,customer_number /*客户号码*/
|
||||
,customer_number_encrypt /*客户号码加密串*/
|
||||
,customer_province /*客户省份*/
|
||||
,customer_city /*客户城市*/
|
||||
,first_call_number /*首呼座席电话*/
|
||||
,first_call_cno /*首呼座席工号*/
|
||||
,first_call_cname /*首呼座席姓名*/
|
||||
,first_call_qno /*首呼队列号*/
|
||||
,first_call_qname /*首呼队列名称*/
|
||||
,ivr_name /*IVR名称*/
|
||||
,hotline /*热线号码*/
|
||||
,hotline_name /*热线别名*/
|
||||
,xnumber /*虚拟号码*/
|
||||
,ib_status /*接听状态*/
|
||||
,ib_result /*呼叫结果*/
|
||||
,status_robot /*机器人接听状态*/
|
||||
,ib_tag /*通话标签*/
|
||||
,webrtc_call_id /*WebRTCCallID*/
|
||||
,sip_cause_desc /*呼叫情况*/
|
||||
,call_type /*呼叫类型*/
|
||||
,record_file /*录音文件*/
|
||||
,on_hook_source /*挂断方*/
|
||||
,investigation_keys /*满意度评价*/
|
||||
,agent_answer_in_time /*首次及时应答*/
|
||||
,evaluation /*是否邀评*/
|
||||
,user_field /*自定义字段*/
|
||||
,start_time /*开始时间*/
|
||||
,ring_time /*振铃时间*/
|
||||
,ib_ringing_duration /*振铃时长*/
|
||||
,end_time /*结束时间*/
|
||||
,answer_time /*接听时间*/
|
||||
,offhook_time /*座席接起时间*/
|
||||
,bridge_time /*首次接听时间*/
|
||||
,bridge_duration /*通话时长*/
|
||||
,total_duration /*总时长*/
|
||||
,first_join_queue_time /*首次进入队列时间*/
|
||||
,say_voice_duration /*语音播报时长*/
|
||||
,mark_data /*备注*/
|
||||
,ib_unique_id /*呼入通话ID*/
|
||||
,Etl_First_Dt /*最初入库时间*/
|
||||
,Etl_Job /*作业名称*/
|
||||
,Etl_Proc_Dt /*本次入库时间*/
|
||||
,Etl_Tx_Dt /*作业运行时间*/
|
||||
,Src_Sysname /*来源系统*/
|
||||
,Src_Table /*来源表*/
|
||||
,Etl_Batch_No /*作业批次号*/
|
||||
|
||||
)
|
||||
SELECT
|
||||
P1.call_id /*CallID*/
|
||||
,P1.customer_number /*客户号码*/
|
||||
,P1.customer_number_encrypt /*客户号码加密串*/
|
||||
,P1.customer_province /*客户省份*/
|
||||
,P1.customer_city /*客户城市*/
|
||||
,P1.first_call_number /*首呼座席电话*/
|
||||
,P1.first_call_cno /*首呼座席工号*/
|
||||
,P1.first_call_cname /*首呼座席姓名*/
|
||||
,P1.first_call_qno /*首呼队列号*/
|
||||
,P1.first_call_qname /*首呼队列名称*/
|
||||
,P1.ivr_name /*IVR名称*/
|
||||
,P1.hotline /*热线号码*/
|
||||
,P1.hotline_name /*热线别名*/
|
||||
,P1.xnumber /*虚拟号码*/
|
||||
,P1.ib_status /*接听状态*/
|
||||
,P1.ib_result /*呼叫结果*/
|
||||
,P1.status_robot /*机器人接听状态*/
|
||||
,P1.ib_tag /*通话标签*/
|
||||
,P1.webrtc_call_id /*WebRTCCallID*/
|
||||
,P1.sip_cause_desc /*呼叫情况*/
|
||||
,P1.call_type /*呼叫类型*/
|
||||
,P1.record_file /*录音文件*/
|
||||
,P1.on_hook_source /*挂断方*/
|
||||
,P1.investigation_keys /*满意度评价*/
|
||||
,P1.agent_answer_in_time /*首次及时应答*/
|
||||
,P1.evaluation /*是否邀评*/
|
||||
,P1.user_field /*自定义字段*/
|
||||
,P1.start_time /*开始时间*/
|
||||
,P1.ring_time /*振铃时间*/
|
||||
,P1.ib_ringing_duration /*振铃时长*/
|
||||
,P1.end_time /*结束时间*/
|
||||
,P1.answer_time /*接听时间*/
|
||||
,P1.offhook_time /*座席接起时间*/
|
||||
,P1.bridge_time /*首次接听时间*/
|
||||
,P1.bridge_duration /*通话时长*/
|
||||
,P1.total_duration /*总时长*/
|
||||
,P1.first_join_queue_time /*首次进入队列时间*/
|
||||
,P1.say_voice_duration /*语音播报时长*/
|
||||
,P1.mark_data /*备注*/
|
||||
,P1.ib_unique_id /*呼入通话ID*/
|
||||
,P1.Etl_First_Dt /*最初入库时间*/
|
||||
,P1.Etl_Job /*作业名称*/
|
||||
,P1.Etl_Proc_Dt /*本次入库时间*/
|
||||
,P1.Etl_Tx_Dt /*作业运行时间*/
|
||||
,P1.Src_Sysname /*来源系统*/
|
||||
,P1.Src_Table /*来源表*/
|
||||
,P1.Etl_Batch_No /*作业批次号*/
|
||||
|
||||
FROM t01_ccc_ib_record_agi_CUR_I P1
|
||||
LEFT JOIN :PDMDB.t01_ccc_ib_record P2
|
||||
ON P1.call_id = P2.call_id
|
||||
AND P1.customer_number = P2.customer_number
|
||||
AND P1.customer_number_encrypt = P2.customer_number_encrypt
|
||||
AND P1.customer_province = P2.customer_province
|
||||
AND P1.customer_city = P2.customer_city
|
||||
AND P1.first_call_number = P2.first_call_number
|
||||
AND P1.first_call_cno = P2.first_call_cno
|
||||
AND P1.first_call_cname = P2.first_call_cname
|
||||
AND P1.first_call_qno = P2.first_call_qno
|
||||
AND P1.first_call_qname = P2.first_call_qname
|
||||
AND P1.ivr_name = P2.ivr_name
|
||||
AND P1.hotline = P2.hotline
|
||||
AND P1.hotline_name = P2.hotline_name
|
||||
AND P1.xnumber = P2.xnumber
|
||||
AND P1.ib_status = P2.ib_status
|
||||
AND P1.ib_result = P2.ib_result
|
||||
AND P1.status_robot = P2.status_robot
|
||||
AND P1.ib_tag = P2.ib_tag
|
||||
AND P1.webrtc_call_id = P2.webrtc_call_id
|
||||
AND P1.sip_cause_desc = P2.sip_cause_desc
|
||||
AND P1.call_type = P2.call_type
|
||||
AND P1.record_file = P2.record_file
|
||||
AND P1.on_hook_source = P2.on_hook_source
|
||||
AND P1.investigation_keys = P2.investigation_keys
|
||||
AND P1.agent_answer_in_time = P2.agent_answer_in_time
|
||||
AND P1.evaluation = P2.evaluation
|
||||
AND P1.user_field = P2.user_field
|
||||
AND P1.start_time = P2.start_time
|
||||
AND P1.ring_time = P2.ring_time
|
||||
AND P1.ib_ringing_duration = P2.ib_ringing_duration
|
||||
AND P1.end_time = P2.end_time
|
||||
AND P1.answer_time = P2.answer_time
|
||||
AND P1.offhook_time = P2.offhook_time
|
||||
AND P1.bridge_time = P2.bridge_time
|
||||
AND P1.bridge_duration = P2.bridge_duration
|
||||
AND P1.total_duration = P2.total_duration
|
||||
AND P1.first_join_queue_time = P2.first_join_queue_time
|
||||
AND P1.say_voice_duration = P2.say_voice_duration
|
||||
AND P1.mark_data = P2.mark_data
|
||||
AND P1.ib_unique_id = P2.ib_unique_id
|
||||
|
||||
WHERE P2.call_id IS NULL
|
||||
OR P2.customer_number IS NULL
|
||||
OR P2.customer_number_encrypt IS NULL
|
||||
OR P2.customer_province IS NULL
|
||||
OR P2.customer_city IS NULL
|
||||
OR P2.first_call_number IS NULL
|
||||
OR P2.first_call_cno IS NULL
|
||||
OR P2.first_call_cname IS NULL
|
||||
OR P2.first_call_qno IS NULL
|
||||
OR P2.first_call_qname IS NULL
|
||||
OR P2.ivr_name IS NULL
|
||||
OR P2.hotline IS NULL
|
||||
OR P2.hotline_name IS NULL
|
||||
OR P2.xnumber IS NULL
|
||||
OR P2.ib_status IS NULL
|
||||
OR P2.ib_result IS NULL
|
||||
OR P2.status_robot IS NULL
|
||||
OR P2.ib_tag IS NULL
|
||||
OR P2.webrtc_call_id IS NULL
|
||||
OR P2.sip_cause_desc IS NULL
|
||||
OR P2.call_type IS NULL
|
||||
OR P2.record_file IS NULL
|
||||
OR P2.on_hook_source IS NULL
|
||||
OR P2.investigation_keys IS NULL
|
||||
OR P2.agent_answer_in_time IS NULL
|
||||
OR P2.evaluation IS NULL
|
||||
OR P2.user_field IS NULL
|
||||
OR P2.start_time IS NULL
|
||||
OR P2.ring_time IS NULL
|
||||
OR P2.ib_ringing_duration IS NULL
|
||||
OR P2.end_time IS NULL
|
||||
OR P2.answer_time IS NULL
|
||||
OR P2.offhook_time IS NULL
|
||||
OR P2.bridge_time IS NULL
|
||||
OR P2.bridge_duration IS NULL
|
||||
OR P2.total_duration IS NULL
|
||||
OR P2.first_join_queue_time IS NULL
|
||||
OR P2.say_voice_duration IS NULL
|
||||
OR P2.mark_data IS NULL
|
||||
OR P2.ib_unique_id IS NULL
|
||||
|
||||
;
|
||||
/*将新增数据插入到目标表 */
|
||||
;INSERT INTO :PDMDB.t01_ccc_ib_record (
|
||||
call_id /*CallID*/
|
||||
,customer_number /*客户号码*/
|
||||
,customer_number_encrypt /*客户号码加密串*/
|
||||
,customer_province /*客户省份*/
|
||||
,customer_city /*客户城市*/
|
||||
,first_call_number /*首呼座席电话*/
|
||||
,first_call_cno /*首呼座席工号*/
|
||||
,first_call_cname /*首呼座席姓名*/
|
||||
,first_call_qno /*首呼队列号*/
|
||||
,first_call_qname /*首呼队列名称*/
|
||||
,ivr_name /*IVR名称*/
|
||||
,hotline /*热线号码*/
|
||||
,hotline_name /*热线别名*/
|
||||
,xnumber /*虚拟号码*/
|
||||
,ib_status /*接听状态*/
|
||||
,ib_result /*呼叫结果*/
|
||||
,status_robot /*机器人接听状态*/
|
||||
,ib_tag /*通话标签*/
|
||||
,webrtc_call_id /*WebRTCCallID*/
|
||||
,sip_cause_desc /*呼叫情况*/
|
||||
,call_type /*呼叫类型*/
|
||||
,record_file /*录音文件*/
|
||||
,on_hook_source /*挂断方*/
|
||||
,investigation_keys /*满意度评价*/
|
||||
,agent_answer_in_time /*首次及时应答*/
|
||||
,evaluation /*是否邀评*/
|
||||
,user_field /*自定义字段*/
|
||||
,start_time /*开始时间*/
|
||||
,ring_time /*振铃时间*/
|
||||
,ib_ringing_duration /*振铃时长*/
|
||||
,end_time /*结束时间*/
|
||||
,answer_time /*接听时间*/
|
||||
,offhook_time /*座席接起时间*/
|
||||
,bridge_time /*首次接听时间*/
|
||||
,bridge_duration /*通话时长*/
|
||||
,total_duration /*总时长*/
|
||||
,first_join_queue_time /*首次进入队列时间*/
|
||||
,say_voice_duration /*语音播报时长*/
|
||||
,mark_data /*备注*/
|
||||
,ib_unique_id /*呼入通话ID*/
|
||||
,Etl_First_Dt /*最初入库时间*/
|
||||
,Etl_Job /*作业名称*/
|
||||
,Etl_Proc_Dt /*本次入库时间*/
|
||||
,Etl_Tx_Dt /*作业运行时间*/
|
||||
,Src_Sysname /*来源系统*/
|
||||
,Src_Table /*来源表*/
|
||||
,Etl_Batch_No /*作业批次号*/
|
||||
|
||||
)
|
||||
SELECT
|
||||
P1.call_id /*CallID*/
|
||||
,P1.customer_number /*客户号码*/
|
||||
,P1.customer_number_encrypt /*客户号码加密串*/
|
||||
,P1.customer_province /*客户省份*/
|
||||
,P1.customer_city /*客户城市*/
|
||||
,P1.first_call_number /*首呼座席电话*/
|
||||
,P1.first_call_cno /*首呼座席工号*/
|
||||
,P1.first_call_cname /*首呼座席姓名*/
|
||||
,P1.first_call_qno /*首呼队列号*/
|
||||
,P1.first_call_qname /*首呼队列名称*/
|
||||
,P1.ivr_name /*IVR名称*/
|
||||
,P1.hotline /*热线号码*/
|
||||
,P1.hotline_name /*热线别名*/
|
||||
,P1.xnumber /*虚拟号码*/
|
||||
,P1.ib_status /*接听状态*/
|
||||
,P1.ib_result /*呼叫结果*/
|
||||
,P1.status_robot /*机器人接听状态*/
|
||||
,P1.ib_tag /*通话标签*/
|
||||
,P1.webrtc_call_id /*WebRTCCallID*/
|
||||
,P1.sip_cause_desc /*呼叫情况*/
|
||||
,P1.call_type /*呼叫类型*/
|
||||
,P1.record_file /*录音文件*/
|
||||
,P1.on_hook_source /*挂断方*/
|
||||
,P1.investigation_keys /*满意度评价*/
|
||||
,P1.agent_answer_in_time /*首次及时应答*/
|
||||
,P1.evaluation /*是否邀评*/
|
||||
,P1.user_field /*自定义字段*/
|
||||
,P1.start_time /*开始时间*/
|
||||
,P1.ring_time /*振铃时间*/
|
||||
,P1.ib_ringing_duration /*振铃时长*/
|
||||
,P1.end_time /*结束时间*/
|
||||
,P1.answer_time /*接听时间*/
|
||||
,P1.offhook_time /*座席接起时间*/
|
||||
,P1.bridge_time /*首次接听时间*/
|
||||
,P1.bridge_duration /*通话时长*/
|
||||
,P1.total_duration /*总时长*/
|
||||
,P1.first_join_queue_time /*首次进入队列时间*/
|
||||
,P1.say_voice_duration /*语音播报时长*/
|
||||
,P1.mark_data /*备注*/
|
||||
,P1.ib_unique_id /*呼入通话ID*/
|
||||
,P1.Etl_First_Dt /*最初入库时间*/
|
||||
,P1.Etl_Job /*作业名称*/
|
||||
,P1.Etl_Proc_Dt /*本次入库时间*/
|
||||
,P1.Etl_Tx_Dt /*作业运行时间*/
|
||||
,P1.Src_Sysname /*来源系统*/
|
||||
,P1.Src_Table /*来源表*/
|
||||
,P1.Etl_Batch_No /*作业批次号*/
|
||||
|
||||
FROM t01_ccc_ib_record_agi_INS P1
|
||||
ON CONFLICT ( ib_unique_id)
|
||||
DO UPDATE SET
|
||||
ib_unique_id=excluded.ib_unique_id
|
||||
,call_id=excluded.call_id
|
||||
,customer_number=excluded.customer_number
|
||||
,customer_number_encrypt=excluded.customer_number_encrypt
|
||||
,customer_province=excluded.customer_province
|
||||
,customer_city=excluded.customer_city
|
||||
,first_call_number=excluded.first_call_number
|
||||
,first_call_cno=excluded.first_call_cno
|
||||
,first_call_cname=excluded.first_call_cname
|
||||
,first_call_qno=excluded.first_call_qno
|
||||
,first_call_qname=excluded.first_call_qname
|
||||
,ivr_name=excluded.ivr_name
|
||||
,hotline=excluded.hotline
|
||||
,hotline_name=excluded.hotline_name
|
||||
,xnumber=excluded.xnumber
|
||||
,ib_status=excluded.ib_status
|
||||
,ib_result=excluded.ib_result
|
||||
,status_robot=excluded.status_robot
|
||||
,ib_tag=excluded.ib_tag
|
||||
,webrtc_call_id=excluded.webrtc_call_id
|
||||
,sip_cause_desc=excluded.sip_cause_desc
|
||||
,call_type=excluded.call_type
|
||||
,record_file=excluded.record_file
|
||||
,on_hook_source=excluded.on_hook_source
|
||||
,investigation_keys=excluded.investigation_keys
|
||||
,agent_answer_in_time=excluded.agent_answer_in_time
|
||||
,evaluation=excluded.evaluation
|
||||
,user_field=excluded.user_field
|
||||
,start_time=excluded.start_time
|
||||
,ring_time=excluded.ring_time
|
||||
,ib_ringing_duration=excluded.ib_ringing_duration
|
||||
,end_time=excluded.end_time
|
||||
,answer_time=excluded.answer_time
|
||||
,offhook_time=excluded.offhook_time
|
||||
,bridge_time=excluded.bridge_time
|
||||
,bridge_duration=excluded.bridge_duration
|
||||
,total_duration=excluded.total_duration
|
||||
,first_join_queue_time=excluded.first_join_queue_time
|
||||
,say_voice_duration=excluded.say_voice_duration
|
||||
,mark_data=excluded.mark_data
|
||||
,Etl_First_Dt=excluded.Etl_First_Dt
|
||||
,Etl_Job=excluded.Etl_Job
|
||||
,Etl_Proc_Dt=excluded.Etl_Proc_Dt
|
||||
,Etl_Tx_Dt=excluded.Etl_Tx_Dt
|
||||
,Src_Sysname=excluded.Src_Sysname
|
||||
,Src_Table=excluded.Src_Table
|
||||
,Etl_Batch_No=excluded.Etl_Batch_No
|
||||
|
||||
|
||||
;
|
||||
/*****程序结束退出 */
|
||||
\q
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
|
||||
DROP TABLE IF EXISTS p20_pdm.t01_ccc_ob_record;
|
||||
CREATE TABLE IF NOT EXISTS p20_pdm.t01_ccc_ob_record (
|
||||
ob_unique_id varchar(50)
|
||||
, customer_number varchar(20)
|
||||
, customer_number_encrypt varchar(50)
|
||||
, customer_area varchar(20)
|
||||
, customer_province varchar(20)
|
||||
, customer_city varchar(20)
|
||||
, call_type varchar(10)
|
||||
, call_type_key varchar(20)
|
||||
, call_type_desc varchar(50)
|
||||
, detail_call_type varchar(10)
|
||||
, detail_call_type_desc varchar(50)
|
||||
, sip_cause varchar(10)
|
||||
, sip_cause_desc varchar(50)
|
||||
, left_clid varchar(20)
|
||||
, left_clid_area varchar(20)
|
||||
, left_clid_province varchar(20)
|
||||
, left_clid_city varchar(20)
|
||||
, trunk_group_key varchar(20)
|
||||
, xnumber varchar(20)
|
||||
, xnumber_area varchar(20)
|
||||
, xnumber_province varchar(20)
|
||||
, xnumber_city varchar(20)
|
||||
, status varchar(10)
|
||||
, status_desc varchar(20)
|
||||
, tag_names varchar(20)
|
||||
, request_unique_id varchar(50)
|
||||
, ob_sip_cause varchar(10)
|
||||
, on_hook_source varchar(20)
|
||||
, record_file text
|
||||
, tsi_file text
|
||||
, asr_record varchar(10)
|
||||
, evaluation varchar(10)
|
||||
, investigation_keys text
|
||||
, call_id varchar(50)
|
||||
, webrtc_call_id varchar(50)
|
||||
, rtc_uid varchar(50)
|
||||
, cno varchar(10)
|
||||
, client_name varchar(20)
|
||||
, client_number varchar(20)
|
||||
, start_time timestamp(0)
|
||||
, up_time timestamp(0)
|
||||
, callee_ringing_time timestamp(0)
|
||||
, bridge_time timestamp(0)
|
||||
, end_time timestamp(0)
|
||||
, bridge_duration int
|
||||
, total_duration int
|
||||
, pre_ring_wait_duration int
|
||||
, callee_ringing_duration int
|
||||
, ob_wait_duration int
|
||||
, task_id varchar(50)
|
||||
, task_name varchar(20)
|
||||
, task_inventory_id varchar(20)
|
||||
, exist_ticket varchar(20)
|
||||
, ticket_ids varchar(20)
|
||||
, exist_business varchar(20)
|
||||
, business_ids varchar(50)
|
||||
, user_field text
|
||||
, exist_customer varchar(20)
|
||||
, customer_area_code varchar(20)
|
||||
, customer_post_code varchar(10)
|
||||
, customer_vip varchar(10)
|
||||
, enterprise_id varchar(20)
|
||||
, mark_data text
|
||||
, cdrobagent_type varchar(20)
|
||||
, 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)
|
||||
,primary key( ob_unique_id )
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.ob_unique_id IS '通话ID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_number IS '客户号码';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_number_encrypt IS '客户号码加密串';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_area IS '客户地区,省份/城市';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_province IS '客户号码省份';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_city IS '客户号码城市';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.call_type IS '通话类型';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.call_type_key IS '通话类型Key值';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.call_type_desc IS '通话类型描述';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.detail_call_type IS '呼叫类型';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.detail_call_type_desc IS '呼叫类型描述';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.sip_cause IS '呼叫情况';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.sip_cause_desc IS '呼叫情况描述';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.left_clid IS '外显号码';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.left_clid_area IS '外显号码归属地区';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.left_clid_province IS '外显号码归属省份';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.left_clid_city IS '外显号码归属城市';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.trunk_group_key IS '中继组号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.xnumber IS '虚拟号码';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.xnumber_area IS '虚拟号码归属地区';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.xnumber_province IS '虚拟号码归属省份';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.xnumber_city IS '虚拟号码归属城市';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.status IS '接听状态值';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.status_desc IS '接听状态描述';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.tag_names IS '通话标签';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.request_unique_id IS '通话唯一ID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.ob_sip_cause IS '呼叫结果';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.on_hook_source IS '挂断方';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.record_file IS '录音文件';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.tsi_file IS '客户彩铃录音';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.asr_record IS '转写记录标识 ';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.evaluation IS '是否邀评';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.investigation_keys IS '满意度评价';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.call_id IS 'CallID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.webrtc_call_id IS 'WebRTCCallID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.rtc_uid IS 'RtcUid';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.cno IS '座席工号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.client_name IS '座席名称';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.client_number IS '座席电话';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.start_time IS '开始时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.up_time IS '座席接起时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.callee_ringing_time IS '客户响铃时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.bridge_time IS '客户接听时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.end_time IS '结束时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.bridge_duration IS '通话时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.total_duration IS '总时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.pre_ring_wait_duration IS '响铃前等待时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.callee_ringing_duration IS '客户响铃时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.ob_wait_duration IS '外呼等待时长';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.task_id IS '外呼任务id';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.task_name IS '外呼任务名称';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.task_inventory_id IS '外呼任务详情id';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.exist_ticket IS '是否存在工单';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.ticket_ids IS '工单id';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.exist_business IS '是否存在业务记录';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.business_ids IS '业务记录ID';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.user_field IS '自定义字段';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.exist_customer IS '是否存在客户资料';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_area_code IS '客户号码区号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_post_code IS '追加客户邮编';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.customer_vip IS '客户VIP标识';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.enterprise_id IS '企业号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.mark_data IS '备注';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.cdrobagent_type IS 'cdrObAgent';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Etl_Batch_No IS '作业批次号';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Etl_First_Dt IS '最初入库时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Etl_Job IS '作业名称';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Etl_Proc_Dt IS '本次入库时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Etl_Tx_Dt IS '作业运行时间';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Src_Sysname IS '来源系统';
|
||||
COMMENT ON COLUMN p20_pdm.t01_ccc_ob_record.Src_Table IS '来源表';
|
||||
|
||||
COMMENT ON TABLE p20_pdm.t01_ccc_ob_record IS 'smartccc呼出记录';
|
|
@ -0,0 +1,548 @@
|
|||
/***************************************************************************************************/
|
||||
/*script in Sql, generate by SdmCreateScript 2020(by Qihang Feng, QF255001@TERADATA.COM) */
|
||||
/*VERSION 01.10 revised on 2020-08-25 */
|
||||
/*Brilliance stems from wisdoms. */
|
||||
/*************Head Section**************************************************************************/
|
||||
/*Script Use: Periodically load data to :t01_ccc_ob_record(smartccc呼出记录) */
|
||||
/*Create Date:2024-07-19 15:21:02 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2024-07-19 */
|
||||
/*SDM Checked By: dev */
|
||||
/*SDM Checked Date: 2024-07-19 */
|
||||
/*Script Developed By: dev */
|
||||
/*Script Checked By: dev */
|
||||
/*Job Type: Inbound transform (Tier 1 to Tier 2) */
|
||||
/*Target Table:t01_ccc_ob_record */
|
||||
/*ETL Job Name:t01_ccc_ob_record */
|
||||
/*ETL Frequency:Daily */
|
||||
/*ETL Policy:F2 */
|
||||
/********************************************************************************************/
|
||||
/*******Main Section**************************************************************************/
|
||||
\set ON_ERROR_STOP on
|
||||
\set AUTOCOMMIT on
|
||||
\timing on
|
||||
|
||||
|
||||
|
||||
/*创建临时表加载当前数据 */
|
||||
CREATE TEMPORARY TABLE t01_ccc_ob_record_agi_CUR_I
|
||||
( LIKE :PDMDB.t01_ccc_ob_record)
|
||||
ON COMMIT PRESERVE ROWS;
|
||||
|
||||
|
||||
|
||||
/*创建临时表加载不同数据 */
|
||||
CREATE TEMPORARY TABLE t01_ccc_ob_record_agi_INS
|
||||
( LIKE :PDMDB.t01_ccc_ob_record)
|
||||
ON COMMIT PRESERVE ROWS;
|
||||
|
||||
|
||||
/*将不同数据插入到临时表 */
|
||||
;INSERT INTO t01_ccc_ob_record_agi_INS (
|
||||
customer_number /*客户号码*/
|
||||
,customer_number_encrypt /*客户号码加密串*/
|
||||
,customer_area /*客户地区,省份/城市*/
|
||||
,customer_province /*客户号码省份*/
|
||||
,customer_city /*客户号码城市*/
|
||||
,call_type /*通话类型*/
|
||||
,call_type_key /*通话类型Key值*/
|
||||
,call_type_desc /*通话类型描述*/
|
||||
,detail_call_type /*呼叫类型*/
|
||||
,detail_call_type_desc /*呼叫类型描述*/
|
||||
,sip_cause /*呼叫情况*/
|
||||
,sip_cause_desc /*呼叫情况描述*/
|
||||
,left_clid /*外显号码*/
|
||||
,left_clid_area /*外显号码归属地区*/
|
||||
,left_clid_province /*外显号码归属省份*/
|
||||
,left_clid_city /*外显号码归属城市*/
|
||||
,trunk_group_key /*中继组号*/
|
||||
,xnumber /*虚拟号码*/
|
||||
,xnumber_area /*虚拟号码归属地区*/
|
||||
,xnumber_province /*虚拟号码归属省份*/
|
||||
,xnumber_city /*虚拟号码归属城市*/
|
||||
,status /*接听状态值*/
|
||||
,status_desc /*接听状态描述*/
|
||||
,tag_names /*通话标签*/
|
||||
,request_unique_id /*通话唯一ID*/
|
||||
,ob_sip_cause /*呼叫结果*/
|
||||
,on_hook_source /*挂断方*/
|
||||
,record_file /*录音文件*/
|
||||
,tsi_file /*客户彩铃录音*/
|
||||
,asr_record /*转写记录标识 */
|
||||
,evaluation /*是否邀评*/
|
||||
,investigation_keys /*满意度评价*/
|
||||
,call_id /*CallID*/
|
||||
,webrtc_call_id /*WebRTCCallID*/
|
||||
,rtc_uid /*RtcUid*/
|
||||
,cno /*座席工号*/
|
||||
,client_name /*座席名称*/
|
||||
,client_number /*座席电话*/
|
||||
,start_time /*开始时间*/
|
||||
,up_time /*座席接起时间*/
|
||||
,callee_ringing_time /*客户响铃时间*/
|
||||
,bridge_time /*客户接听时间*/
|
||||
,end_time /*结束时间*/
|
||||
,bridge_duration /*通话时长*/
|
||||
,total_duration /*总时长*/
|
||||
,pre_ring_wait_duration /*响铃前等待时长*/
|
||||
,callee_ringing_duration /*客户响铃时长*/
|
||||
,ob_wait_duration /*外呼等待时长*/
|
||||
,task_id /*外呼任务id*/
|
||||
,task_name /*外呼任务名称*/
|
||||
,task_inventory_id /*外呼任务详情id*/
|
||||
,exist_ticket /*是否存在工单*/
|
||||
,ticket_ids /*工单id*/
|
||||
,exist_business /*是否存在业务记录*/
|
||||
,business_ids /*业务记录ID*/
|
||||
,user_field /*自定义字段*/
|
||||
,exist_customer /*是否存在客户资料*/
|
||||
,customer_area_code /*客户号码区号*/
|
||||
,customer_post_code /*追加客户邮编*/
|
||||
,customer_vip /*客户VIP标识*/
|
||||
,enterprise_id /*企业号*/
|
||||
,mark_data /*备注*/
|
||||
,cdrobagent_type /*cdrObAgent*/
|
||||
,ob_unique_id /*通话ID*/
|
||||
,Etl_Batch_No /*作业批次号*/
|
||||
,Etl_First_Dt /*最初入库时间*/
|
||||
,Etl_Job /*作业名称*/
|
||||
,Etl_Proc_Dt /*本次入库时间*/
|
||||
,Etl_Tx_Dt /*作业运行时间*/
|
||||
,Src_Sysname /*来源系统*/
|
||||
,Src_Table /*来源表*/
|
||||
|
||||
)
|
||||
SELECT
|
||||
P1.customer_number /*客户号码*/
|
||||
,P1.customer_number_encrypt /*客户号码加密串*/
|
||||
,P1.customer_area /*客户地区,省份/城市*/
|
||||
,P1.customer_province /*客户号码省份*/
|
||||
,P1.customer_city /*客户号码城市*/
|
||||
,P1.call_type /*通话类型*/
|
||||
,P1.call_type_key /*通话类型Key值*/
|
||||
,P1.call_type_desc /*通话类型描述*/
|
||||
,P1.detail_call_type /*呼叫类型*/
|
||||
,P1.detail_call_type_desc /*呼叫类型描述*/
|
||||
,P1.sip_cause /*呼叫情况*/
|
||||
,P1.sip_cause_desc /*呼叫情况描述*/
|
||||
,P1.left_clid /*外显号码*/
|
||||
,P1.left_clid_area /*外显号码归属地区*/
|
||||
,P1.left_clid_province /*外显号码归属省份*/
|
||||
,P1.left_clid_city /*外显号码归属城市*/
|
||||
,P1.trunk_group_key /*中继组号*/
|
||||
,P1.xnumber /*虚拟号码*/
|
||||
,P1.xnumber_area /*虚拟号码归属地区*/
|
||||
,P1.xnumber_province /*虚拟号码归属省份*/
|
||||
,P1.xnumber_city /*虚拟号码归属城市*/
|
||||
,P1.status /*接听状态值*/
|
||||
,P1.status_desc /*接听状态描述*/
|
||||
,P1.tag_names /*通话标签*/
|
||||
,P1.request_unique_id /*通话唯一ID*/
|
||||
,P1.ob_sip_cause /*呼叫结果*/
|
||||
,P1.on_hook_source /*挂断方*/
|
||||
,P1.record_file /*录音文件*/
|
||||
,P1.tsi_file /*客户彩铃录音*/
|
||||
,P1.asr_record /*转写记录标识 */
|
||||
,P1.evaluation /*是否邀评*/
|
||||
,P1.investigation_keys /*满意度评价*/
|
||||
,P1.call_id /*CallID*/
|
||||
,P1.webrtc_call_id /*WebRTCCallID*/
|
||||
,P1.rtc_uid /*RtcUid*/
|
||||
,P1.cno /*座席工号*/
|
||||
,P1.client_name /*座席名称*/
|
||||
,P1.client_number /*座席电话*/
|
||||
,P1.start_time /*开始时间*/
|
||||
,P1.up_time /*座席接起时间*/
|
||||
,P1.callee_ringing_time /*客户响铃时间*/
|
||||
,P1.bridge_time /*客户接听时间*/
|
||||
,P1.end_time /*结束时间*/
|
||||
,P1.bridge_duration /*通话时长*/
|
||||
,P1.total_duration /*总时长*/
|
||||
,P1.pre_ring_wait_duration /*响铃前等待时长*/
|
||||
,P1.callee_ringing_duration /*客户响铃时长*/
|
||||
,P1.ob_wait_duration /*外呼等待时长*/
|
||||
,P1.task_id /*外呼任务id*/
|
||||
,P1.task_name /*外呼任务名称*/
|
||||
,P1.task_inventory_id /*外呼任务详情id*/
|
||||
,P1.exist_ticket /*是否存在工单*/
|
||||
,P1.ticket_ids /*工单id*/
|
||||
,P1.exist_business /*是否存在业务记录*/
|
||||
,P1.business_ids /*业务记录ID*/
|
||||
,P1.user_field /*自定义字段*/
|
||||
,P1.exist_customer /*是否存在客户资料*/
|
||||
,P1.customer_area_code /*客户号码区号*/
|
||||
,P1.customer_post_code /*追加客户邮编*/
|
||||
,P1.customer_vip /*客户VIP标识*/
|
||||
,P1.enterprise_id /*企业号*/
|
||||
,P1.mark_data /*备注*/
|
||||
,P1.cdrobagent_type /*cdrObAgent*/
|
||||
,P1.ob_unique_id /*通话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 t01_ccc_ob_record_agi_CUR_I P1
|
||||
LEFT JOIN :PDMDB.t01_ccc_ob_record P2
|
||||
ON P1.customer_number = P2.customer_number
|
||||
AND P1.customer_number_encrypt = P2.customer_number_encrypt
|
||||
AND P1.customer_area = P2.customer_area
|
||||
AND P1.customer_province = P2.customer_province
|
||||
AND P1.customer_city = P2.customer_city
|
||||
AND P1.call_type = P2.call_type
|
||||
AND P1.call_type_key = P2.call_type_key
|
||||
AND P1.call_type_desc = P2.call_type_desc
|
||||
AND P1.detail_call_type = P2.detail_call_type
|
||||
AND P1.detail_call_type_desc = P2.detail_call_type_desc
|
||||
AND P1.sip_cause = P2.sip_cause
|
||||
AND P1.sip_cause_desc = P2.sip_cause_desc
|
||||
AND P1.left_clid = P2.left_clid
|
||||
AND P1.left_clid_area = P2.left_clid_area
|
||||
AND P1.left_clid_province = P2.left_clid_province
|
||||
AND P1.left_clid_city = P2.left_clid_city
|
||||
AND P1.trunk_group_key = P2.trunk_group_key
|
||||
AND P1.xnumber = P2.xnumber
|
||||
AND P1.xnumber_area = P2.xnumber_area
|
||||
AND P1.xnumber_province = P2.xnumber_province
|
||||
AND P1.xnumber_city = P2.xnumber_city
|
||||
AND P1.status = P2.status
|
||||
AND P1.status_desc = P2.status_desc
|
||||
AND P1.tag_names = P2.tag_names
|
||||
AND P1.request_unique_id = P2.request_unique_id
|
||||
AND P1.ob_sip_cause = P2.ob_sip_cause
|
||||
AND P1.on_hook_source = P2.on_hook_source
|
||||
AND P1.record_file = P2.record_file
|
||||
AND P1.tsi_file = P2.tsi_file
|
||||
AND P1.asr_record = P2.asr_record
|
||||
AND P1.evaluation = P2.evaluation
|
||||
AND P1.investigation_keys = P2.investigation_keys
|
||||
AND P1.call_id = P2.call_id
|
||||
AND P1.webrtc_call_id = P2.webrtc_call_id
|
||||
AND P1.rtc_uid = P2.rtc_uid
|
||||
AND P1.cno = P2.cno
|
||||
AND P1.client_name = P2.client_name
|
||||
AND P1.client_number = P2.client_number
|
||||
AND P1.start_time = P2.start_time
|
||||
AND P1.up_time = P2.up_time
|
||||
AND P1.callee_ringing_time = P2.callee_ringing_time
|
||||
AND P1.bridge_time = P2.bridge_time
|
||||
AND P1.end_time = P2.end_time
|
||||
AND P1.bridge_duration = P2.bridge_duration
|
||||
AND P1.total_duration = P2.total_duration
|
||||
AND P1.pre_ring_wait_duration = P2.pre_ring_wait_duration
|
||||
AND P1.callee_ringing_duration = P2.callee_ringing_duration
|
||||
AND P1.ob_wait_duration = P2.ob_wait_duration
|
||||
AND P1.task_id = P2.task_id
|
||||
AND P1.task_name = P2.task_name
|
||||
AND P1.task_inventory_id = P2.task_inventory_id
|
||||
AND P1.exist_ticket = P2.exist_ticket
|
||||
AND P1.ticket_ids = P2.ticket_ids
|
||||
AND P1.exist_business = P2.exist_business
|
||||
AND P1.business_ids = P2.business_ids
|
||||
AND P1.user_field = P2.user_field
|
||||
AND P1.exist_customer = P2.exist_customer
|
||||
AND P1.customer_area_code = P2.customer_area_code
|
||||
AND P1.customer_post_code = P2.customer_post_code
|
||||
AND P1.customer_vip = P2.customer_vip
|
||||
AND P1.enterprise_id = P2.enterprise_id
|
||||
AND P1.mark_data = P2.mark_data
|
||||
AND P1.cdrobagent_type = P2.cdrobagent_type
|
||||
AND P1.ob_unique_id = P2.ob_unique_id
|
||||
|
||||
WHERE P2.customer_number IS NULL
|
||||
OR P2.customer_number_encrypt IS NULL
|
||||
OR P2.customer_area IS NULL
|
||||
OR P2.customer_province IS NULL
|
||||
OR P2.customer_city IS NULL
|
||||
OR P2.call_type IS NULL
|
||||
OR P2.call_type_key IS NULL
|
||||
OR P2.call_type_desc IS NULL
|
||||
OR P2.detail_call_type IS NULL
|
||||
OR P2.detail_call_type_desc IS NULL
|
||||
OR P2.sip_cause IS NULL
|
||||
OR P2.sip_cause_desc IS NULL
|
||||
OR P2.left_clid IS NULL
|
||||
OR P2.left_clid_area IS NULL
|
||||
OR P2.left_clid_province IS NULL
|
||||
OR P2.left_clid_city IS NULL
|
||||
OR P2.trunk_group_key IS NULL
|
||||
OR P2.xnumber IS NULL
|
||||
OR P2.xnumber_area IS NULL
|
||||
OR P2.xnumber_province IS NULL
|
||||
OR P2.xnumber_city IS NULL
|
||||
OR P2.status IS NULL
|
||||
OR P2.status_desc IS NULL
|
||||
OR P2.tag_names IS NULL
|
||||
OR P2.request_unique_id IS NULL
|
||||
OR P2.ob_sip_cause IS NULL
|
||||
OR P2.on_hook_source IS NULL
|
||||
OR P2.record_file IS NULL
|
||||
OR P2.tsi_file IS NULL
|
||||
OR P2.asr_record IS NULL
|
||||
OR P2.evaluation IS NULL
|
||||
OR P2.investigation_keys IS NULL
|
||||
OR P2.call_id IS NULL
|
||||
OR P2.webrtc_call_id IS NULL
|
||||
OR P2.rtc_uid IS NULL
|
||||
OR P2.cno IS NULL
|
||||
OR P2.client_name IS NULL
|
||||
OR P2.client_number IS NULL
|
||||
OR P2.start_time IS NULL
|
||||
OR P2.up_time IS NULL
|
||||
OR P2.callee_ringing_time IS NULL
|
||||
OR P2.bridge_time IS NULL
|
||||
OR P2.end_time IS NULL
|
||||
OR P2.bridge_duration IS NULL
|
||||
OR P2.total_duration IS NULL
|
||||
OR P2.pre_ring_wait_duration IS NULL
|
||||
OR P2.callee_ringing_duration IS NULL
|
||||
OR P2.ob_wait_duration IS NULL
|
||||
OR P2.task_id IS NULL
|
||||
OR P2.task_name IS NULL
|
||||
OR P2.task_inventory_id IS NULL
|
||||
OR P2.exist_ticket IS NULL
|
||||
OR P2.ticket_ids IS NULL
|
||||
OR P2.exist_business IS NULL
|
||||
OR P2.business_ids IS NULL
|
||||
OR P2.user_field IS NULL
|
||||
OR P2.exist_customer IS NULL
|
||||
OR P2.customer_area_code IS NULL
|
||||
OR P2.customer_post_code IS NULL
|
||||
OR P2.customer_vip IS NULL
|
||||
OR P2.enterprise_id IS NULL
|
||||
OR P2.mark_data IS NULL
|
||||
OR P2.cdrobagent_type IS NULL
|
||||
OR P2.ob_unique_id IS NULL
|
||||
|
||||
;
|
||||
/*将新增数据插入到目标表 */
|
||||
;INSERT INTO :PDMDB.t01_ccc_ob_record (
|
||||
customer_number /*客户号码*/
|
||||
,customer_number_encrypt /*客户号码加密串*/
|
||||
,customer_area /*客户地区,省份/城市*/
|
||||
,customer_province /*客户号码省份*/
|
||||
,customer_city /*客户号码城市*/
|
||||
,call_type /*通话类型*/
|
||||
,call_type_key /*通话类型Key值*/
|
||||
,call_type_desc /*通话类型描述*/
|
||||
,detail_call_type /*呼叫类型*/
|
||||
,detail_call_type_desc /*呼叫类型描述*/
|
||||
,sip_cause /*呼叫情况*/
|
||||
,sip_cause_desc /*呼叫情况描述*/
|
||||
,left_clid /*外显号码*/
|
||||
,left_clid_area /*外显号码归属地区*/
|
||||
,left_clid_province /*外显号码归属省份*/
|
||||
,left_clid_city /*外显号码归属城市*/
|
||||
,trunk_group_key /*中继组号*/
|
||||
,xnumber /*虚拟号码*/
|
||||
,xnumber_area /*虚拟号码归属地区*/
|
||||
,xnumber_province /*虚拟号码归属省份*/
|
||||
,xnumber_city /*虚拟号码归属城市*/
|
||||
,status /*接听状态值*/
|
||||
,status_desc /*接听状态描述*/
|
||||
,tag_names /*通话标签*/
|
||||
,request_unique_id /*通话唯一ID*/
|
||||
,ob_sip_cause /*呼叫结果*/
|
||||
,on_hook_source /*挂断方*/
|
||||
,record_file /*录音文件*/
|
||||
,tsi_file /*客户彩铃录音*/
|
||||
,asr_record /*转写记录标识 */
|
||||
,evaluation /*是否邀评*/
|
||||
,investigation_keys /*满意度评价*/
|
||||
,call_id /*CallID*/
|
||||
,webrtc_call_id /*WebRTCCallID*/
|
||||
,rtc_uid /*RtcUid*/
|
||||
,cno /*座席工号*/
|
||||
,client_name /*座席名称*/
|
||||
,client_number /*座席电话*/
|
||||
,start_time /*开始时间*/
|
||||
,up_time /*座席接起时间*/
|
||||
,callee_ringing_time /*客户响铃时间*/
|
||||
,bridge_time /*客户接听时间*/
|
||||
,end_time /*结束时间*/
|
||||
,bridge_duration /*通话时长*/
|
||||
,total_duration /*总时长*/
|
||||
,pre_ring_wait_duration /*响铃前等待时长*/
|
||||
,callee_ringing_duration /*客户响铃时长*/
|
||||
,ob_wait_duration /*外呼等待时长*/
|
||||
,task_id /*外呼任务id*/
|
||||
,task_name /*外呼任务名称*/
|
||||
,task_inventory_id /*外呼任务详情id*/
|
||||
,exist_ticket /*是否存在工单*/
|
||||
,ticket_ids /*工单id*/
|
||||
,exist_business /*是否存在业务记录*/
|
||||
,business_ids /*业务记录ID*/
|
||||
,user_field /*自定义字段*/
|
||||
,exist_customer /*是否存在客户资料*/
|
||||
,customer_area_code /*客户号码区号*/
|
||||
,customer_post_code /*追加客户邮编*/
|
||||
,customer_vip /*客户VIP标识*/
|
||||
,enterprise_id /*企业号*/
|
||||
,mark_data /*备注*/
|
||||
,cdrobagent_type /*cdrObAgent*/
|
||||
,ob_unique_id /*通话ID*/
|
||||
,Etl_Batch_No /*作业批次号*/
|
||||
,Etl_First_Dt /*最初入库时间*/
|
||||
,Etl_Job /*作业名称*/
|
||||
,Etl_Proc_Dt /*本次入库时间*/
|
||||
,Etl_Tx_Dt /*作业运行时间*/
|
||||
,Src_Sysname /*来源系统*/
|
||||
,Src_Table /*来源表*/
|
||||
|
||||
)
|
||||
SELECT
|
||||
P1.customer_number /*客户号码*/
|
||||
,P1.customer_number_encrypt /*客户号码加密串*/
|
||||
,P1.customer_area /*客户地区,省份/城市*/
|
||||
,P1.customer_province /*客户号码省份*/
|
||||
,P1.customer_city /*客户号码城市*/
|
||||
,P1.call_type /*通话类型*/
|
||||
,P1.call_type_key /*通话类型Key值*/
|
||||
,P1.call_type_desc /*通话类型描述*/
|
||||
,P1.detail_call_type /*呼叫类型*/
|
||||
,P1.detail_call_type_desc /*呼叫类型描述*/
|
||||
,P1.sip_cause /*呼叫情况*/
|
||||
,P1.sip_cause_desc /*呼叫情况描述*/
|
||||
,P1.left_clid /*外显号码*/
|
||||
,P1.left_clid_area /*外显号码归属地区*/
|
||||
,P1.left_clid_province /*外显号码归属省份*/
|
||||
,P1.left_clid_city /*外显号码归属城市*/
|
||||
,P1.trunk_group_key /*中继组号*/
|
||||
,P1.xnumber /*虚拟号码*/
|
||||
,P1.xnumber_area /*虚拟号码归属地区*/
|
||||
,P1.xnumber_province /*虚拟号码归属省份*/
|
||||
,P1.xnumber_city /*虚拟号码归属城市*/
|
||||
,P1.status /*接听状态值*/
|
||||
,P1.status_desc /*接听状态描述*/
|
||||
,P1.tag_names /*通话标签*/
|
||||
,P1.request_unique_id /*通话唯一ID*/
|
||||
,P1.ob_sip_cause /*呼叫结果*/
|
||||
,P1.on_hook_source /*挂断方*/
|
||||
,P1.record_file /*录音文件*/
|
||||
,P1.tsi_file /*客户彩铃录音*/
|
||||
,P1.asr_record /*转写记录标识 */
|
||||
,P1.evaluation /*是否邀评*/
|
||||
,P1.investigation_keys /*满意度评价*/
|
||||
,P1.call_id /*CallID*/
|
||||
,P1.webrtc_call_id /*WebRTCCallID*/
|
||||
,P1.rtc_uid /*RtcUid*/
|
||||
,P1.cno /*座席工号*/
|
||||
,P1.client_name /*座席名称*/
|
||||
,P1.client_number /*座席电话*/
|
||||
,P1.start_time /*开始时间*/
|
||||
,P1.up_time /*座席接起时间*/
|
||||
,P1.callee_ringing_time /*客户响铃时间*/
|
||||
,P1.bridge_time /*客户接听时间*/
|
||||
,P1.end_time /*结束时间*/
|
||||
,P1.bridge_duration /*通话时长*/
|
||||
,P1.total_duration /*总时长*/
|
||||
,P1.pre_ring_wait_duration /*响铃前等待时长*/
|
||||
,P1.callee_ringing_duration /*客户响铃时长*/
|
||||
,P1.ob_wait_duration /*外呼等待时长*/
|
||||
,P1.task_id /*外呼任务id*/
|
||||
,P1.task_name /*外呼任务名称*/
|
||||
,P1.task_inventory_id /*外呼任务详情id*/
|
||||
,P1.exist_ticket /*是否存在工单*/
|
||||
,P1.ticket_ids /*工单id*/
|
||||
,P1.exist_business /*是否存在业务记录*/
|
||||
,P1.business_ids /*业务记录ID*/
|
||||
,P1.user_field /*自定义字段*/
|
||||
,P1.exist_customer /*是否存在客户资料*/
|
||||
,P1.customer_area_code /*客户号码区号*/
|
||||
,P1.customer_post_code /*追加客户邮编*/
|
||||
,P1.customer_vip /*客户VIP标识*/
|
||||
,P1.enterprise_id /*企业号*/
|
||||
,P1.mark_data /*备注*/
|
||||
,P1.cdrobagent_type /*cdrObAgent*/
|
||||
,P1.ob_unique_id /*通话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 t01_ccc_ob_record_agi_INS P1
|
||||
ON CONFLICT ( ob_unique_id)
|
||||
DO UPDATE SET
|
||||
ob_unique_id=excluded.ob_unique_id
|
||||
,customer_number=excluded.customer_number
|
||||
,customer_number_encrypt=excluded.customer_number_encrypt
|
||||
,customer_area=excluded.customer_area
|
||||
,customer_province=excluded.customer_province
|
||||
,customer_city=excluded.customer_city
|
||||
,call_type=excluded.call_type
|
||||
,call_type_key=excluded.call_type_key
|
||||
,call_type_desc=excluded.call_type_desc
|
||||
,detail_call_type=excluded.detail_call_type
|
||||
,detail_call_type_desc=excluded.detail_call_type_desc
|
||||
,sip_cause=excluded.sip_cause
|
||||
,sip_cause_desc=excluded.sip_cause_desc
|
||||
,left_clid=excluded.left_clid
|
||||
,left_clid_area=excluded.left_clid_area
|
||||
,left_clid_province=excluded.left_clid_province
|
||||
,left_clid_city=excluded.left_clid_city
|
||||
,trunk_group_key=excluded.trunk_group_key
|
||||
,xnumber=excluded.xnumber
|
||||
,xnumber_area=excluded.xnumber_area
|
||||
,xnumber_province=excluded.xnumber_province
|
||||
,xnumber_city=excluded.xnumber_city
|
||||
,status=excluded.status
|
||||
,status_desc=excluded.status_desc
|
||||
,tag_names=excluded.tag_names
|
||||
,request_unique_id=excluded.request_unique_id
|
||||
,ob_sip_cause=excluded.ob_sip_cause
|
||||
,on_hook_source=excluded.on_hook_source
|
||||
,record_file=excluded.record_file
|
||||
,tsi_file=excluded.tsi_file
|
||||
,asr_record=excluded.asr_record
|
||||
,evaluation=excluded.evaluation
|
||||
,investigation_keys=excluded.investigation_keys
|
||||
,call_id=excluded.call_id
|
||||
,webrtc_call_id=excluded.webrtc_call_id
|
||||
,rtc_uid=excluded.rtc_uid
|
||||
,cno=excluded.cno
|
||||
,client_name=excluded.client_name
|
||||
,client_number=excluded.client_number
|
||||
,start_time=excluded.start_time
|
||||
,up_time=excluded.up_time
|
||||
,callee_ringing_time=excluded.callee_ringing_time
|
||||
,bridge_time=excluded.bridge_time
|
||||
,end_time=excluded.end_time
|
||||
,bridge_duration=excluded.bridge_duration
|
||||
,total_duration=excluded.total_duration
|
||||
,pre_ring_wait_duration=excluded.pre_ring_wait_duration
|
||||
,callee_ringing_duration=excluded.callee_ringing_duration
|
||||
,ob_wait_duration=excluded.ob_wait_duration
|
||||
,task_id=excluded.task_id
|
||||
,task_name=excluded.task_name
|
||||
,task_inventory_id=excluded.task_inventory_id
|
||||
,exist_ticket=excluded.exist_ticket
|
||||
,ticket_ids=excluded.ticket_ids
|
||||
,exist_business=excluded.exist_business
|
||||
,business_ids=excluded.business_ids
|
||||
,user_field=excluded.user_field
|
||||
,exist_customer=excluded.exist_customer
|
||||
,customer_area_code=excluded.customer_area_code
|
||||
,customer_post_code=excluded.customer_post_code
|
||||
,customer_vip=excluded.customer_vip
|
||||
,enterprise_id=excluded.enterprise_id
|
||||
,mark_data=excluded.mark_data
|
||||
,cdrobagent_type=excluded.cdrobagent_type
|
||||
,Etl_Batch_No=excluded.Etl_Batch_No
|
||||
,Etl_First_Dt=excluded.Etl_First_Dt
|
||||
,Etl_Job=excluded.Etl_Job
|
||||
,Etl_Proc_Dt=excluded.Etl_Proc_Dt
|
||||
,Etl_Tx_Dt=excluded.Etl_Tx_Dt
|
||||
,Src_Sysname=excluded.Src_Sysname
|
||||
,Src_Table=excluded.Src_Table
|
||||
|
||||
|
||||
;
|
||||
/*****程序结束退出 */
|
||||
\q
|
||||
|
|
@ -37,7 +37,7 @@ task_failed = EmailOperator (
|
|||
cc=[""],
|
||||
subject="smart_ccc_cdr_failed",
|
||||
html_content='<h3>您好,smart_ccc_cdr作业失败,请及时处理" </h3>')
|
||||
|
||||
|
||||
cc_cdr_ib_list_feign = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='cc_cdr_ib_list_feign',
|
||||
|
@ -56,7 +56,7 @@ retries=3,
|
|||
dag=dag)
|
||||
|
||||
cc_cdr_ib_list_feign >> cc_cdr_ib_list_load
|
||||
|
||||
|
||||
cc_cdr_ob_list_feign = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='cc_cdr_ob_list_feign',
|
||||
|
@ -75,7 +75,7 @@ retries=3,
|
|||
dag=dag)
|
||||
|
||||
cc_cdr_ob_list_feign >> cc_cdr_ob_list_load
|
||||
|
||||
|
||||
cc_cdr_ib_agent_list_feign = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='cc_cdr_ib_agent_list_feign',
|
||||
|
@ -94,7 +94,7 @@ retries=3,
|
|||
dag=dag)
|
||||
|
||||
cc_cdr_ib_agent_list_feign >> cc_cdr_ib_agent_list_load
|
||||
|
||||
|
||||
tr_cc_cdr_ib_agent_list_9092 = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='tr_cc_cdr_ib_agent_list_9092',
|
||||
|
@ -103,7 +103,7 @@ params={'my_param':"S98_S_tr_cc_cdr_ib_agent_list"},
|
|||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
|
||||
|
||||
tr_cc_cdr_ib_list_9521 = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='tr_cc_cdr_ib_list_9521',
|
||||
|
@ -112,7 +112,7 @@ params={'my_param':"S98_S_tr_cc_cdr_ib_list"},
|
|||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
|
||||
|
||||
tr_cc_cdr_ob_detail_5097 = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='tr_cc_cdr_ob_detail_5097',
|
||||
|
@ -121,7 +121,7 @@ params={'my_param':"S98_S_tr_cc_cdr_ob_detail"},
|
|||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
|
||||
|
||||
tr_cc_cdr_ob_list_4070 = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='tr_cc_cdr_ob_list_4070',
|
||||
|
@ -130,13 +130,49 @@ params={'my_param':"S98_S_tr_cc_cdr_ob_list"},
|
|||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
|
||||
cc_cdr_ob_detail_feign = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='cc_cdr_ob_detail_feign',
|
||||
command='python3 /data/airflow/etl/API/cc_cdr_ob_detail_feign.py',
|
||||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
|
||||
cc_cdr_ib_agent_list_load >> tr_cc_cdr_ib_agent_list_9092
|
||||
cc_cdr_ib_list_load >> tr_cc_cdr_ib_list_9521
|
||||
cc_cdr_ob_list_load >> tr_cc_cdr_ob_list_4070
|
||||
cc_cdr_ob_list_load >> tr_cc_cdr_ob_detail_5097
|
||||
cc_cdr_ob_detail_load = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='cc_cdr_ob_detail_load',
|
||||
command='/data/airflow/etl/API/run_psql.sh {{ ds_nodash }} {{params.my_param }}',
|
||||
params={'my_param':"cc_cdr_ob_detail_load"},
|
||||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
|
||||
tr_cc_cdr_ob_detail_5097 >> task_failed
|
||||
tr_cc_cdr_ob_list_4070 >> task_failed
|
||||
tr_cc_cdr_ib_list_9521 >> task_failed
|
||||
tr_cc_cdr_ib_agent_list_9092 >> task_failed
|
||||
cc_cdr_ob_detail_feign >> cc_cdr_ob_detail_load
|
||||
|
||||
t01_ccc_ib_record = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='t01_ccc_ib_record',
|
||||
command='/data/airflow/etl/PDM/run_psql.sh {{ ds_nodash }} {{params.my_param}} >>/data/airflow/logs/run_tpt_{{ds_nodash}}.log 2>&1 ',
|
||||
params={'my_param':"t01_ccc_ib_record_agi"},
|
||||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
t01_ccc_ob_record = SSHOperator(
|
||||
ssh_hook=sshHook,
|
||||
task_id='t01_ccc_ob_record',
|
||||
command='/data/airflow/etl/PDM/run_psql.sh {{ ds_nodash }} {{params.my_param}} >>/data/airflow/logs/run_tpt_{{ds_nodash}}.log 2>&1 ',
|
||||
params={'my_param':"t01_ccc_ob_record_agi"},
|
||||
depends_on_past=False,
|
||||
retries=3,
|
||||
dag=dag)
|
||||
cc_cdr_ib_agent_list_load >> tr_cc_cdr_ib_agent_list_9092
|
||||
cc_cdr_ib_list_load >> tr_cc_cdr_ib_list_9521
|
||||
cc_cdr_ob_list_load >> tr_cc_cdr_ob_list_4070
|
||||
cc_cdr_ob_list_load >> tr_cc_cdr_ob_detail_5097
|
||||
tr_cc_cdr_ib_list_9521 >> t01_ccc_ib_record
|
||||
tr_cc_cdr_ib_agent_list_9092 >> t01_ccc_ib_record
|
||||
tr_cc_cdr_ob_list_4070 >> t01_ccc_ob_record
|
||||
tr_cc_cdr_ob_detail_5097 >> t01_ccc_ob_record
|
||||
t01_ccc_ob_record >> task_failed
|
||||
cc_cdr_ob_detail_load >> task_failed
|
||||
|
|
Loading…
Reference in New Issue