All interactions table for CALLS and DIGITAL

This commit is contained in:
Anna Saiapina 2024-03-11 12:25:40 +00:00 committed by GCP Dataform
parent 0b1ba29825
commit d8a214bc23

View File

@ -0,0 +1,30 @@
config {
type: "table",
schema: "pphe_five9_gold",
assertions: {
uniqueKey: ["?"],
nonNull: ["?"]
},
tags: ["daily"],
description: "All interactions table for CALLS and DIGITAL"
}
select TIMESTAMP,
DATE,
HOUR_OF_DAY,
MONTH,
YEAR,
AGENT_ID,
'PHONE' MEDIA_TYPE_ID,
1 INTERACTIONS
from ${ref("CALLS")}
union all
select TIMESTAMP,
DATE,
HOUR_OF_DAY,
MONTH,
YEAR,
AGENT_ID,
MEDIA_TYPE_ID,
INTERACTIONS
from ${ref("DIGITAL")}