From 8bc71dc2b5b46f0b83baca991ff57cde030846d4 Mon Sep 17 00:00:00 2001 From: Anna Saiapina Date: Tue, 23 Jul 2024 08:39:18 +0000 Subject: [PATCH] Change amount of report days --- definitions/staging/stg_calls_history_report.sqlx | 2 +- definitions/staging/stg_calls_report.sqlx | 2 +- definitions/staging/stg_digital_history_report.sqlx | 2 +- definitions/staging/stg_digital_report.sqlx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/definitions/staging/stg_calls_history_report.sqlx b/definitions/staging/stg_calls_history_report.sqlx index 768f3c8..f1b1213 100644 --- a/definitions/staging/stg_calls_history_report.sqlx +++ b/definitions/staging/stg_calls_history_report.sqlx @@ -75,5 +75,5 @@ left join ${ref("stg_MAPPING_PROPERTY_CALLS")} p on sc.Routing_Hotel_Name = p.ROUTING_HOTEL_NAME left join ${ref("stg_MAPPING_SKILL")} s on sc.SKILL = s.SKILL -${ when(incremental(), `where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 8 DAY) +${ when(incremental(), `where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) and date(sc.TIMESTAMP) < CURRENT_DATE()`) } \ No newline at end of file diff --git a/definitions/staging/stg_calls_report.sqlx b/definitions/staging/stg_calls_report.sqlx index 96cfe84..2d54738 100644 --- a/definitions/staging/stg_calls_report.sqlx +++ b/definitions/staging/stg_calls_report.sqlx @@ -75,5 +75,5 @@ left join ${ref("stg_MAPPING_PROPERTY_CALLS")} p on sc.Routing_Hotel_Name = p.ROUTING_HOTEL_NAME left join ${ref("stg_MAPPING_SKILL")} s on sc.SKILL = s.SKILL -where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 8 DAY) +where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) and date(sc.TIMESTAMP) < CURRENT_DATE() \ No newline at end of file diff --git a/definitions/staging/stg_digital_history_report.sqlx b/definitions/staging/stg_digital_history_report.sqlx index 14d6545..1b5e9bd 100644 --- a/definitions/staging/stg_digital_history_report.sqlx +++ b/definitions/staging/stg_digital_history_report.sqlx @@ -55,5 +55,5 @@ left join ${ref("stg_MAPPING_SKILL")} s on d.SKILL = s.SKILL left join ${ref("stg_MAPPING_MEDIA_TYPE")} m on d.MEDIA_TYPE = m.MEDIA_TYPE -${ when(incremental(), `where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 8 DAY) +${ when(incremental(), `where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) and date(d.TIMESTAMP) < CURRENT_DATE()`) } \ No newline at end of file diff --git a/definitions/staging/stg_digital_report.sqlx b/definitions/staging/stg_digital_report.sqlx index f5c27ec..64a2d5f 100644 --- a/definitions/staging/stg_digital_report.sqlx +++ b/definitions/staging/stg_digital_report.sqlx @@ -54,5 +54,5 @@ left join ${ref("stg_MAPPING_SKILL")} s on d.SKILL = s.SKILL left join ${ref("stg_MAPPING_MEDIA_TYPE")} m on d.MEDIA_TYPE = m.MEDIA_TYPE -where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 8 DAY) +where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) and date(d.TIMESTAMP) < CURRENT_DATE() \ No newline at end of file