Create export tables

This commit is contained in:
Anna Saiapina 2024-03-21 15:18:15 +00:00 committed by GCP Dataform
parent 67a5edba12
commit 341e5aefe5
4 changed files with 32 additions and 2 deletions

View 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)

View 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)

View 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)

View File

@ -5,7 +5,7 @@ config {
description: "All interactions table for CALLS and DIGITAL" description: "All interactions table for CALLS and DIGITAL"
} }
select TIMESTAMP, select TIMESTAMP_MILLISECOND,
DATE, DATE,
HOUR_OF_DAY, HOUR_OF_DAY,
MONTH, MONTH,
@ -15,7 +15,7 @@ select TIMESTAMP,
1 INTERACTIONS 1 INTERACTIONS
from ${ref("CALLS")} from ${ref("CALLS")}
union all union all
select TIMESTAMP, select TIMESTAMP_MILLISECOND,
DATE, DATE,
HOUR_OF_DAY, HOUR_OF_DAY,
MONTH, MONTH,