From e9ef2250d1e66dbaf8cf47259a1be4e978f3cda7 Mon Sep 17 00:00:00 2001 From: Jethro Nederhof Date: Fri, 21 Jun 2024 11:08:07 +1000 Subject: [PATCH] Fix syntax when snowplow__use_refr_if_mkt_null enabled --- models/sessions/scratch/snowplow_unified_sessions_this_run.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/sessions/scratch/snowplow_unified_sessions_this_run.sql b/models/sessions/scratch/snowplow_unified_sessions_this_run.sql index f4c34f8..919ee00 100644 --- a/models/sessions/scratch/snowplow_unified_sessions_this_run.sql +++ b/models/sessions/scratch/snowplow_unified_sessions_this_run.sql @@ -88,7 +88,7 @@ with session_firsts as ( left join {{ ref(var('snowplow__ga4_categories_seed')) }} c on {% if var('snowplow__use_refr_if_mkt_null', false) %} - lower(trim(coalesce(ev.mkt_source, ev.refr_source)) = lower(c.source) + lower(trim(coalesce(ev.mkt_source, ev.refr_source))) = lower(c.source) {% else %} lower(trim(ev.mkt_source)) = lower(c.source) {% endif %}