From 068a393ee9310addeef59c51b40849f12207c2a4 Mon Sep 17 00:00:00 2001 From: Anna Saiapina Date: Thu, 10 Oct 2024 11:58:57 +0000 Subject: [PATCH] Add filters for agent_status report --- definitions/staging/stg_agent_status_history_report.sqlx | 2 +- definitions/staging/stg_agent_status_report.sqlx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/staging/stg_agent_status_history_report.sqlx b/definitions/staging/stg_agent_status_history_report.sqlx index 5f94367..6ab540e 100644 --- a/definitions/staging/stg_agent_status_history_report.sqlx +++ b/definitions/staging/stg_agent_status_history_report.sqlx @@ -72,7 +72,7 @@ left join ${ref("stg_MAPPING_AGENT_STATE_GROUP_ID")} masg on masgi.STATE_GROUP_ID = masg.STATE_GROUP_ID left join ${ref("stg_MAPPING_AGENT_REASON_CODE_ID")} mrc on ags.REASON_CODE = mrc.REASON_CODE -where ags.REASON_CODE <> 'End of Shift' +where ags.STATE not in ('Login', 'Logout', 'On Park', 'On Preview', 'On Video', 'On Voicemail') and ags.AGENT_ID <> '400000000081027' ${ when(incremental(), `and date(ags.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) and date(ags.TIMESTAMP) < CURRENT_DATE()`) } \ No newline at end of file diff --git a/definitions/staging/stg_agent_status_report.sqlx b/definitions/staging/stg_agent_status_report.sqlx index ce5af72..b4ef08e 100644 --- a/definitions/staging/stg_agent_status_report.sqlx +++ b/definitions/staging/stg_agent_status_report.sqlx @@ -73,6 +73,6 @@ on masgi.STATE_GROUP_ID = masg.STATE_GROUP_ID left join ${ref("stg_MAPPING_AGENT_REASON_CODE_ID")} mrc on ags.REASON_CODE = mrc.REASON_CODE where date(ags.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) -and ags.REASON_CODE <> 'End of Shift' +and ags.STATE not in ('Login', 'Logout', 'On Park', 'On Preview', 'On Video', 'On Voicemail') and ags.AGENT_ID <> '400000000081027' and date(ags.TIMESTAMP) < CURRENT_DATE() \ No newline at end of file