Add filters for agent_status report

This commit is contained in:
Anna Saiapina 2024-10-10 11:58:57 +00:00 committed by GCP Dataform
parent 69b4c2b851
commit 068a393ee9
2 changed files with 2 additions and 2 deletions

View File

@ -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()`) }

View File

@ -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()