From 0c8d534db6ac809af6d05dc4d9e89a87958f7a8e Mon Sep 17 00:00:00 2001 From: Anna Saiapina Date: Fri, 22 Nov 2024 15:13:40 +0000 Subject: [PATCH] Export table for csc agent --- definitions/export/csc_agent_export.sqlx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 definitions/export/csc_agent_export.sqlx diff --git a/definitions/export/csc_agent_export.sqlx b/definitions/export/csc_agent_export.sqlx new file mode 100644 index 0000000..18c31ce --- /dev/null +++ b/definitions/export/csc_agent_export.sqlx @@ -0,0 +1,24 @@ +config { + type: "table", + schema: "pphe_five9_gold", + description: "Exporting last 7 days of csc_agent table" +} + +select RESORT, + MARKET_CODE, + CONFIRMATION_NO, + UPDATE_USER, + AGENT_ID, + CSC_AGENT_YN, + CHANGE_DATE, + DATE, + HOUR, + UPDATE_TYPE, + UPDATE_TYPE_ID, + UPDATE_TYPE_GROUP_ID, + UPDATE_TYPE_GROUP, + REVENUE_GENERATING_YN, + COUNTER +from ${ref("stg_csc_agent")} +where DATE >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) +and CSC_AGENT_YN = 'Y' \ No newline at end of file