Create export tables
This commit is contained in:
parent
67a5edba12
commit
341e5aefe5
10
definitions/export/all_interactions_export.sqlx
Normal file
10
definitions/export/all_interactions_export.sqlx
Normal file
@ -0,0 +1,10 @@
|
||||
config {
|
||||
type: "table",
|
||||
schema: "pphe_five9_gold",
|
||||
tags: ["daily"],
|
||||
description: "Exporting last 5 days of ALL_INTERACRIONS_SUM table"
|
||||
}
|
||||
|
||||
select *
|
||||
from ${ref("ALL_INTERACRIONS_SUM")}
|
||||
where date(timestamp_millisecond) >= date_sub(current_datetime("Europe/Amsterdam"), INTERVAL 5 DAY)
|
||||
10
definitions/export/calls_export.sqlx
Normal file
10
definitions/export/calls_export.sqlx
Normal file
@ -0,0 +1,10 @@
|
||||
config {
|
||||
type: "table",
|
||||
schema: "pphe_five9_gold",
|
||||
tags: ["daily"],
|
||||
description: "Exporting last 5 days of CALLS table"
|
||||
}
|
||||
|
||||
select *
|
||||
from ${ref("CALLS")}
|
||||
where date(timestamp_millisecond) >= date_sub(current_datetime("Europe/Amsterdam"), INTERVAL 5 DAY)
|
||||
10
definitions/export/digital_export.sqlx
Normal file
10
definitions/export/digital_export.sqlx
Normal file
@ -0,0 +1,10 @@
|
||||
config {
|
||||
type: "table",
|
||||
schema: "pphe_five9_gold",
|
||||
tags: ["daily"],
|
||||
description: "Exporting last 5 days of DIGITAL table"
|
||||
}
|
||||
|
||||
select *
|
||||
from ${ref("DIGITAL")}
|
||||
where date(timestamp_millisecond) >= date_sub(current_datetime("Europe/Amsterdam"), INTERVAL 5 DAY)
|
||||
@ -5,7 +5,7 @@ config {
|
||||
description: "All interactions table for CALLS and DIGITAL"
|
||||
}
|
||||
|
||||
select TIMESTAMP,
|
||||
select TIMESTAMP_MILLISECOND,
|
||||
DATE,
|
||||
HOUR_OF_DAY,
|
||||
MONTH,
|
||||
@ -15,7 +15,7 @@ select TIMESTAMP,
|
||||
1 INTERACTIONS
|
||||
from ${ref("CALLS")}
|
||||
union all
|
||||
select TIMESTAMP,
|
||||
select TIMESTAMP_MILLISECOND,
|
||||
DATE,
|
||||
HOUR_OF_DAY,
|
||||
MONTH,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user