From 609185904f94ec89004722c959502ea0a266b84c Mon Sep 17 00:00:00 2001 From: Anna Saiapina Date: Tue, 18 Jun 2024 14:51:11 +0000 Subject: [PATCH] Delete old tables --- definitions/gold/CALLS.sqlx | 14 ------ definitions/sources/CALL_SOURCE.sqlx | 6 --- definitions/staging/stg_CALLS.sqlx | 56 ------------------------ definitions/staging/stg_CALL_SOURCE.sqlx | 14 ------ 4 files changed, 90 deletions(-) delete mode 100644 definitions/gold/CALLS.sqlx delete mode 100644 definitions/sources/CALL_SOURCE.sqlx delete mode 100644 definitions/staging/stg_CALLS.sqlx delete mode 100644 definitions/staging/stg_CALL_SOURCE.sqlx diff --git a/definitions/gold/CALLS.sqlx b/definitions/gold/CALLS.sqlx deleted file mode 100644 index 8d30a96..0000000 --- a/definitions/gold/CALLS.sqlx +++ /dev/null @@ -1,14 +0,0 @@ -config { - type: "table", - schema: "pphe_five9_gold", - assertions: { - uniqueKey: ["CALL_ID", "TIMESTAMP_MILLISECOND"], - nonNull: ["CALL_ID"] - }, - tags: ["daily"], - description: "Daily load of CALLS table from stg" -} - -select - * -from ${ref("stg_CALLS")} \ No newline at end of file diff --git a/definitions/sources/CALL_SOURCE.sqlx b/definitions/sources/CALL_SOURCE.sqlx deleted file mode 100644 index 7e4ac4c..0000000 --- a/definitions/sources/CALL_SOURCE.sqlx +++ /dev/null @@ -1,6 +0,0 @@ -config { - type: "declaration", - schema: "pphe_five9_raw", - name: "CALL_SOURCE", - description: "" - } \ No newline at end of file diff --git a/definitions/staging/stg_CALLS.sqlx b/definitions/staging/stg_CALLS.sqlx deleted file mode 100644 index 24b639d..0000000 --- a/definitions/staging/stg_CALLS.sqlx +++ /dev/null @@ -1,56 +0,0 @@ -config { - type: "table", - schema: "pphe_five9_stg", - assertions: { - uniqueKey: ["CALL_ID", "TIMESTAMP_MILLISECOND"], - nonNull: ["CALL_ID", "AGENT_GROUP_ID", "DISPOSITION_ID",, "DISPOSITION_GROUP_ID", - "DISPOSITION_GROUP", "CAMPAIGN_ID", "CAMPAIGN_GROUP_ID", - "CAMPAIGN_GROUP", "SKILL_ID"] - }, - tags: ["daily"], - description: "CALLS data with mappings" -} - -select cl.TIMESTAMP, - replace(safe_cast(safe_cast(cl.DATE as date) as string), '-', '') DATE, - cl.HOUR_OF_DAY, - cl.DAY_OF_WEEK, - cl.MONTH, - cl.YEAR, - cl.CALL_ID, - cl.HOTEL_NAME, - cl.AGENT_ID, - cl.AGENT_NAME, - a.LANGUAGES, - a.CODE LANGUAUGE_ID, - a.AGENT_GROUP_ID, - cl.AGENT_GROUP, - d.DISPOSITION_ID, - cl.DISPOSITION, - d.DISPOSITION_GROUP_ID, - d.DISPOSITION_GROUP, - c.CAMPAIGN_ID, - cl.CAMPAIGN, - c.CAMPAIGN_GROUP_ID, - c.CAMPAIGN_GROUP, - cl.SKILL, - s.SKILL_ID, - cl.CALL_TIME, - cl.RING_TIME, - cl.TALK_TIME, - cl.SPEED_OF_ANSWER, - cl.AFTER_CALL_WORK_TIME, - cl.CALLS, - cl.ANI, - c.CAMPAIGN_TYPE_ID, - cl.CAMPAIGN_TYPE, - cl.TIMESTAMP_MILLISECOND -from ${ref("stg_CALL_SOURCE")} cl -left join ${ref("stg_AGENT")} a -on cl.AGENT_ID = a.AGENT_ID -left join ${ref("stg_DISPOSITION")} d -on cl.DISPOSITION = d.DISPOSITION -left join ${ref("stg_CAMPAIGN")} c -on cl.CAMPAIGN = c.CAMPAIGN -left join ${ref("stg_MAPPING_SKILL")} s -on cl.SKILL = s.SKILL \ No newline at end of file diff --git a/definitions/staging/stg_CALL_SOURCE.sqlx b/definitions/staging/stg_CALL_SOURCE.sqlx deleted file mode 100644 index 06faf5c..0000000 --- a/definitions/staging/stg_CALL_SOURCE.sqlx +++ /dev/null @@ -1,14 +0,0 @@ -config { - type: "table", - schema: "pphe_five9_stg", - assertions: { - uniqueKey: ["CALL_ID", "TIMESTAMP_MILLISECOND"], - nonNull: ["CALL_ID"] - }, - tags: ["daily"], - description: "Daily load of CALL_SOURCE table from raw" -} - -select - * -from ${ref("CALL_SOURCE")} \ No newline at end of file