Adding assertions

This commit is contained in:
Anna Saiapina 2024-03-20 13:37:41 +00:00 committed by GCP Dataform
parent 968bbf7dc4
commit 67a5edba12
7 changed files with 16 additions and 18 deletions

View File

@ -1,10 +1,6 @@
config { config {
type: "table", type: "table",
schema: "pphe_five9_gold", schema: "pphe_five9_gold",
assertions: {
uniqueKey: ["?"],
nonNull: ["?"]
},
tags: ["daily"], tags: ["daily"],
description: "All interactions table for CALLS and DIGITAL" description: "All interactions table for CALLS and DIGITAL"
} }

View File

@ -2,7 +2,7 @@ config {
type: "table", type: "table",
schema: "pphe_five9_gold", schema: "pphe_five9_gold",
assertions: { assertions: {
uniqueKey: ["CALL_ID"], uniqueKey: ["CALL_ID", "TIMESTAMP_MILLISECOND"],
nonNull: ["CALL_ID"] nonNull: ["CALL_ID"]
}, },
tags: ["daily"], tags: ["daily"],

View File

@ -2,7 +2,7 @@ config {
type: "table", type: "table",
schema: "pphe_five9_gold", schema: "pphe_five9_gold",
assertions: { assertions: {
uniqueKey: ["CUSTOMER_ID"], uniqueKey: ["CUSTOMER_ID", "TIMESTAMP_MILLISECOND"],
nonNull: ["CUSTOMER_ID"] nonNull: ["CUSTOMER_ID"]
}, },
tags: ["daily"], tags: ["daily"],

View File

@ -2,8 +2,10 @@ config {
type: "table", type: "table",
schema: "pphe_five9_stg", schema: "pphe_five9_stg",
assertions: { assertions: {
uniqueKey: ["CALL_ID"], uniqueKey: ["CALL_ID", "TIMESTAMP_MILLISECOND"],
nonNull: ["CALL_ID"] nonNull: ["CALL_ID", "AGENT_GROUP_ID", "DISPOSITION_ID",, "DISPOSITION_GROUP_ID",
"DISPOSITION_GROUP", "CAMPAIGN_ID", "CAMPAIGN_GROUP_ID",
"CAMPAIGN_GROUP", "SKILL_ID"]
}, },
tags: ["daily"], tags: ["daily"],
description: "CALLS data with mappings" description: "CALLS data with mappings"
@ -42,9 +44,7 @@ select cl.TIMESTAMP,
cl.ANI, cl.ANI,
c.CAMPAIGN_TYPE_ID, c.CAMPAIGN_TYPE_ID,
cl.CAMPAIGN_TYPE, cl.CAMPAIGN_TYPE,
cl.DISPOSITION_GROUP_A, cl.TIMESTAMP_MILLISECOND
cl.DISPOSITION_GROUP_B,
cl.DISPOSITION_GROUP_C,
from ${ref("stg_CALL_SOURCE")} cl from ${ref("stg_CALL_SOURCE")} cl
left join ${ref("stg_AGENT")} a left join ${ref("stg_AGENT")} a
on cl.AGENT_ID = a.AGENT_ID on cl.AGENT_ID = a.AGENT_ID

View File

@ -2,8 +2,8 @@ config {
type: "table", type: "table",
schema: "pphe_five9_stg", schema: "pphe_five9_stg",
assertions: { assertions: {
uniqueKey: ["ID"], uniqueKey: ["CALL_ID", "TIMESTAMP_MILLISECOND"],
nonNull: ["ID"] nonNull: ["CALL_ID"]
}, },
tags: ["daily"], tags: ["daily"],
description: "Daily load of CALL_SOURCE table from raw" description: "Daily load of CALL_SOURCE table from raw"

View File

@ -2,8 +2,9 @@ config {
type: "table", type: "table",
schema: "pphe_five9_stg", schema: "pphe_five9_stg",
assertions: { assertions: {
uniqueKey: ["CUSTOMER_ID"], uniqueKey: ["CUSTOMER_ID", "TIMESTAMP_MILLISECOND"],
nonNull: ["CUSTOMER_ID"] nonNull: ["CUSTOMER_ID", "AGENT_GROUP_ID", "DISPOSITION_ID", "MEDIA_TYPE_ID",
"CAMPAIGN_ID", "CAMPAIGN_GROUP_ID", "CAMPAIGN_GROUP", "SKILL_ID"]
}, },
tags: ["daily"], tags: ["daily"],
description: "DIGITAL data with mappings" description: "DIGITAL data with mappings"
@ -33,7 +34,8 @@ select dl.TIMESTAMP,
dl.HANDLE_TIME, dl.HANDLE_TIME,
dl.TRANSFERS_TO_SKILL, dl.TRANSFERS_TO_SKILL,
dl.INTERACTIONS, dl.INTERACTIONS,
dl.CUSTOMER_ID dl.CUSTOMER_ID,
dl.TIMESTAMP_MILLISECOND
from ${ref("stg_DIGITAL_SOURCE")} dl from ${ref("stg_DIGITAL_SOURCE")} dl
left join ${ref("stg_AGENT")} a left join ${ref("stg_AGENT")} a
on dl.AGENT_ID = a.AGENT_ID on dl.AGENT_ID = a.AGENT_ID

View File

@ -2,8 +2,8 @@ config {
type: "table", type: "table",
schema: "pphe_five9_stg", schema: "pphe_five9_stg",
assertions: { assertions: {
uniqueKey: ["ID"], uniqueKey: ["CUSTOMER_ID", "TIMESTAMP_MILLISECOND"],
nonNull: ["ID"] nonNull: ["CUSTOMER_ID"]
}, },
tags: ["daily"], tags: ["daily"],
description: "Daily load of DIGITAL_SOURCE table from raw" description: "Daily load of DIGITAL_SOURCE table from raw"