Add assertion conditions for calls and digital - checking data freshness
This commit is contained in:
parent
4bb7cee271
commit
6665749ed6
7
definitions/assertions/calls_data_freshness.sqlx
Normal file
7
definitions/assertions/calls_data_freshness.sqlx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
config { type: "assertion" }
|
||||||
|
|
||||||
|
select * from(
|
||||||
|
select max(timestamp) max_timestamp
|
||||||
|
from ${ref("pphe_five9_raw","calls_*")}
|
||||||
|
where _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',current_date("Europe/Amsterdam")))
|
||||||
|
where TIMESTAMP_DIFF(max_timestamp, TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY), hour) < 0
|
||||||
7
definitions/assertions/digital_data_freshness.sqlx
Normal file
7
definitions/assertions/digital_data_freshness.sqlx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
config { type: "assertion" }
|
||||||
|
|
||||||
|
select * from(
|
||||||
|
select max(timestamp) max_timestamp
|
||||||
|
from ${ref("pphe_five9_raw","digital_*")}
|
||||||
|
where _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d',current_date("Europe/Amsterdam")))
|
||||||
|
where TIMESTAMP_DIFF(max_timestamp, TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY), hour) < 0
|
||||||
Loading…
Reference in New Issue
Block a user