diff --git a/definitions/staging/stg_calls_report.sqlx b/definitions/staging/stg_calls_report.sqlx index 3639f7c..0d41acb 100644 --- a/definitions/staging/stg_calls_report.sqlx +++ b/definitions/staging/stg_calls_report.sqlx @@ -21,7 +21,7 @@ select sc.SESSION_ID, EXTRACT(YEAR FROM sc.TIMESTAMP) YEAR, sc.DAY_OF_WEEK, sc.CALL_ID, - sc.HOTEL_NAME, + sc.ROUTING_HOTEL_NAME, sc.AGENT_ID, sc.AGENT_NAME, a.LANGUAGES, @@ -67,4 +67,5 @@ left join ${ref("stg_CAMPAIGN")} c on sc.CAMPAIGN = c.CAMPAIGN left join ${ref("stg_MAPPING_SKILL")} s on sc.SKILL = s.SKILL -where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 5 DAY) \ No newline at end of file +where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 6 DAY) +and date(sc.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 968b713..2a0d7b4 100644 --- a/definitions/staging/stg_digital_report.sqlx +++ b/definitions/staging/stg_digital_report.sqlx @@ -48,4 +48,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 5 DAY) \ No newline at end of file +where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 6 DAY) +and date(d.TIMESTAMP) < CURRENT_DATE() \ No newline at end of file