Remove calls with abandoned as NULL

This commit is contained in:
Anna Saiapina 2024-07-04 13:58:37 +00:00 committed by GCP Dataform
parent 8bd623ce2b
commit 3e37926450

View File

@ -16,7 +16,8 @@ select *,
OVER (PARTITION BY SESSION_ID, TIMESTAMP, DNIS)
row_number
from ${ref("pphe_five9_raw","calls_*")}
${ when(incremental(), `where _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',current_date("Europe/Amsterdam"))`) })
where ABANDONED is not null
${ when(incremental(), `and _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',current_date("Europe/Amsterdam"))`) })
select DAY_OF_WEEK,
CALL_ID,
CAMPAIGN,
@ -27,7 +28,7 @@ select DAY_OF_WEEK,
CALL_TIME,
RING_TIME,
TALK_TIME,
AFTER_CALL_WORK_TIME,
AFTER_CALL_WORK_TIME,--
ABANDONED,
COALESCE(AGENT_GROUP, '0') AS AGENT_GROUP,
CALLS,