add workflow 天润Smart-ccc通话记录,dev
This commit is contained in:
parent
4f5a256fcf
commit
b4d2ca9068
|
@ -1,18 +1,18 @@
|
|||
/***************************************************************************************************/
|
||||
/*script in Sql, generate by SdmCreateScript 2020(by Qihang Feng, QF255001@TERADATA.COM) */
|
||||
/*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 :cust_call_record_info(ccc客户通话记录信息) */
|
||||
/*Create Date:2024-09-23 15:50:38 */
|
||||
/*Create Date:2025-06-30 10:25:24 */
|
||||
/*SDM Developed By: dev */
|
||||
/*SDM Developed Date: 2024-09-19 */
|
||||
/*SDM Checked By: dev */
|
||||
/*SDM Checked Date: 2024-09-23 */
|
||||
/*SDM Checked Date: 2025-06-30 */
|
||||
/*Script Developed By: dev */
|
||||
/*Script Checked By: dev */
|
||||
/*Source table 1: :COMMDB.select distinct on (tel) * from p30_common.d_ccc_cust_info */
|
||||
/*Source table 2: :PDMDB.t01_udesk_record */
|
||||
/*Source table 1: :PDMDB.t01_udesk_record */
|
||||
/*Source table 2: :COMMDB.select distinct on (tel) * from p30_common.d_ccc_cust_info */
|
||||
/*Source table 3: :COMMDB.cust_call_ccc_record */
|
||||
/*Job Type: Inbound transform (Tier 1 to Tier 2) */
|
||||
/*Target Table:cust_call_record_info */
|
||||
|
@ -32,7 +32,7 @@ CREATE TEMPORARY TABLE cust_call_record_info_agi_CUR_I
|
|||
( LIKE :MARTDB.cust_call_record_info)
|
||||
ON COMMIT PRESERVE ROWS;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************************************/
|
||||
/* GROUP 1:Source Table:cust_call_ccc_record**********************************************************/
|
||||
/*****************************************************************************************************/
|
||||
|
@ -50,7 +50,7 @@ INSERT INTO cust_call_record_info_agi_CUR_I (
|
|||
,company /*公司*/
|
||||
)
|
||||
SELECT
|
||||
COALESCE(TRIM(p0.call_id),'') /*call_id*/
|
||||
coalesce(p0.unique_id,'') /*call_id*/
|
||||
,'Smart CCC' /*call_channel*/
|
||||
,COALESCE(p0.start_time,TO_TIMESTAMP(:NULLDATE,'YYYYMMDD')) /*start_time*/
|
||||
,COALESCE(CAST(p0.bridge_duration AS numeric (24,3)),0) /*bridge_duration*/
|
||||
|
@ -70,7 +70,7 @@ FROM :COMMDB.cust_call_ccc_record p0
|
|||
LEFT JOIN (select distinct on (tel) * from p30_common.d_ccc_cust_info) p1
|
||||
ON p0.customer_number =p1.tel
|
||||
where p0.hotline_name in ('400呼入','Inbound','SG-TSC')
|
||||
|
||||
group by 1,2,3,4,5,6,7,8,9,10
|
||||
;
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ and udesk_source in ('队列: IAM','队列: SSO-TEK','队列: TSC-KEI','队列:
|
|||
|
||||
/*从目标表中删除所有数据 cust_call_record_info(ccc客户通话记录信息) */
|
||||
DELETE FROM :MARTDB.cust_call_record_info
|
||||
;
|
||||
WHERE ETL_JOB=:ETLJOB;
|
||||
|
||||
|
||||
/*将新增数据插入到目标表 */
|
||||
|
|
Loading…
Reference in New Issue