diff --git a/views/sessions.view.lkml b/views/sessions.view.lkml index 54dbdc8..5a3f9b3 100644 --- a/views/sessions.view.lkml +++ b/views/sessions.view.lkml @@ -53,34 +53,7 @@ select se.session_date as session_date , d.geo__metro , d.geo__sub_continent , d.geo__region) geo_data - , (ARRAY_AGG(se.sl_key - , se.event_rank - , se.page_view_rank - , se.page_view_reverse_rank - , se.time_to_next_event - , se.time_to_next_page - , se.event_date - , se.event_timestamp - , se.event_name - , se.event_params - , se.event_previous_timestamp - , se.event_value_in_usd - , se.event_bundle_sequence_id - , se.event_server_timestamp_offset - , se.user_id - , se.user_pseudo_id - , se.user_properties - , se.user_first_touch_timestamp - , se.user_ltv - , se.device - , se.geo - , se.app_info - , se.traffic_source - , se.stream_id - , se.platform - , se.event_dimensions - , se.ecommerce - , se.items)) as event_data + , (ARRAY_AGG(se.event_data)) 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 4e79e3b..e15a0f4 100644 --- a/views/sessions/session_event_packing.view.lkml +++ b/views/sessions/session_event_packing.view.lkml @@ -16,7 +16,7 @@ view: session_event_packing { , sl.ga_session_id ga_session_id , sl.ga_session_number ga_session_number , sl.user_pseudo_id user_pseudo_id - , sl.sl_key + ,STRUCT( sl.sl_key , sl.event_rank , sl.page_view_rank , sl.page_view_reverse_rank @@ -42,7 +42,7 @@ view: session_event_packing { , sl.platform , sl.event_dimensions , sl.ecommerce - , sl.items + , sl.items) event_data from ${session_list_with_event_history.SQL_TABLE_NAME} AS sl WHERE sl.sl_key IN (SELECT sl_key FROM ${session_facts.SQL_TABLE_NAME} WHERE CASE WHEN "@{EVENT_COUNT}" = "" THEN 1=1 WHEN "@{EVENT_COUNT}" != "" THEN