Skip to content

Commit

Permalink
Update base_select.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
tessa-beijloos authored Dec 16, 2024
1 parent 17f16e3 commit 98891e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions macros/base_select.sql
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@
)) from unnest(items) as unnested_items
) items
, property_id
, {{ ga4.unnest_key('event_params', 'ga_session_id', 'int_value', 'session_id') }}
, CAST(REGEXP_EXTRACT(COALESCE({{ ga4.unnest_key('event_params', 'ga_session_id', 'string_value', 'session_id_string') }}, ""), r'^GS\d\.\d\.(\d+)') AS INT64) as fallback_session_id
, COALESCE({{ ga4.unnest_key('event_params', 'ga_session_id', 'int_value', 'session_id') }}, {{ ga4.unnest_key('event_params', 'ga_session_id', 'string_value', 'session_id_string') }}) as session_id
, {{ ga4.unnest_key('event_params', 'page_location') }}
, {{ ga4.unnest_key('event_params', 'ga_session_number', 'int_value', 'session_number') }}
, COALESCE(
Expand Down

0 comments on commit 98891e4

Please sign in to comment.