From a7f9885ccf6cff66eaf0f0aebb88a0384f54422a Mon Sep 17 00:00:00 2001 From: tessa-beijloos Date: Mon, 6 May 2024 14:27:53 +0200 Subject: [PATCH] Update base_ga4__events.sql --- models/staging/base/base_ga4__events.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/staging/base/base_ga4__events.sql b/models/staging/base/base_ga4__events.sql index 8db733b1..719f52d1 100644 --- a/models/staging/base/base_ga4__events.sql +++ b/models/staging/base/base_ga4__events.sql @@ -22,8 +22,8 @@ with source as ( {{ ga4.base_select_source() }} from {{ source('ga4', 'events') }} where cast(left(replace(_table_suffix, 'intraday_', ''), 8) as int64) >= {{var('start_date')}} - {% if {{ var('end_date') }} is not none %} - and cast(left(replace(_table_suffix, 'intraday_', ''), 8) as int64) <= {{ var('end_date') }} + {% if var('end_date') is not none %} + and cast(left(replace(_table_suffix, 'intraday_', ''), 8) as int64) <= {{ var('end_date')}} {% endif %} {% if is_incremental() %} and parse_date('%Y%m%d', left(replace(_table_suffix, 'intraday_', ''), 8)) in ({{ partitions_to_replace | join(',') }})