From a35eaf5428f2f31d0fbc4d220efa14038ecbb389 Mon Sep 17 00:00:00 2001 From: Anna Saiapina Date: Fri, 20 Sep 2024 10:05:51 +0000 Subject: [PATCH] Adding more time dimensions for agent state tables --- definitions/staging/stg_agent_status_history_report.sqlx | 3 +++ definitions/staging/stg_agent_status_report.sqlx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/definitions/staging/stg_agent_status_history_report.sqlx b/definitions/staging/stg_agent_status_history_report.sqlx index 6bd15f1..ca61a06 100644 --- a/definitions/staging/stg_agent_status_history_report.sqlx +++ b/definitions/staging/stg_agent_status_history_report.sqlx @@ -30,6 +30,9 @@ select ags.AGENT_ID, ags.REASON_CODE, ags.TIMESTAMP, date(ags.TIMESTAMP) DATE, + EXTRACT(HOUR FROM ags.TIMESTAMP) HOUR, + EXTRACT(MONTH FROM ags.TIMESTAMP) MONTH, + EXTRACT(YEAR FROM ags.TIMESTAMP) YEAR, ags.AGENT_STATES, ags.MEDIA_AVAILABILITY, ags.UNAVAILABLE_FOR_CALLS, diff --git a/definitions/staging/stg_agent_status_report.sqlx b/definitions/staging/stg_agent_status_report.sqlx index 54abeae..9164e62 100644 --- a/definitions/staging/stg_agent_status_report.sqlx +++ b/definitions/staging/stg_agent_status_report.sqlx @@ -31,6 +31,9 @@ select ags.AGENT_ID, ags.REASON_CODE, ags.TIMESTAMP, date(ags.TIMESTAMP) DATE, + EXTRACT(HOUR FROM ags.TIMESTAMP) HOUR, + EXTRACT(MONTH FROM ags.TIMESTAMP) MONTH, + EXTRACT(YEAR FROM ags.TIMESTAMP) YEAR, ags.AGENT_STATES, ags.MEDIA_AVAILABILITY, ags.UNAVAILABLE_FOR_CALLS,