From 8ea391b1ed91a9f2d9a86a5f8ff93dcfa2511b37 Mon Sep 17 00:00:00 2001 From: Andres Gregori Altamirano Date: Thu, 11 Jul 2024 20:26:10 +0000 Subject: [PATCH] Change sessions logic --- views/sessions.view.lkml | 6 +++--- views/sessions/session_event_packing.view.lkml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/views/sessions.view.lkml b/views/sessions.view.lkml index b952784..2307771 100644 --- a/views/sessions.view.lkml +++ b/views/sessions.view.lkml @@ -12,7 +12,7 @@ view: sessions { increment_offset: 3 sql: -- Final Select Statement: -select se.session_date as session_date +select select se.session_date as session_date , se.ga_session_id as ga_session_id , se.ga_session_number as ga_session_number , se.user_pseudo_id as user_pseudo_id @@ -53,7 +53,7 @@ select se.session_date as session_date , d.geo__metro , d.geo__sub_continent , d.geo__region) geo_data - , (SELECT ARRAY_AGG(STRUCT se.sl_key + , (SELECT AS STRUCT se.sl_key , se.event_rank , se.page_view_rank , se.page_view_reverse_rank @@ -80,7 +80,7 @@ select se.session_date as session_date , se.platform , se.event_dimensions , se.ecommerce - , se.items)) se.event_data event_data + , se.items) as event_data from ${session_event_packing.SQL_TABLE_NAME} as se left join ${session_tags.SQL_TABLE_NAME} as sa on se.sl_key = sa.sl_key diff --git a/views/sessions/session_event_packing.view.lkml b/views/sessions/session_event_packing.view.lkml index b45b12b..60a7825 100644 --- a/views/sessions/session_event_packing.view.lkml +++ b/views/sessions/session_event_packing.view.lkml @@ -31,7 +31,6 @@ view: session_event_packing { , sl.event_bundle_sequence_id , sl.event_server_timestamp_offset , sl.user_id - , sl.user_pseudo_id , sl.user_properties , sl.user_first_touch_timestamp , sl.user_ltv