Skip to content

Commit

Permalink
Change event data
Browse files Browse the repository at this point in the history
  • Loading branch information
agregori97 committed Jul 12, 2024
1 parent ae7b78a commit bd29a42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
29 changes: 1 addition & 28 deletions views/sessions.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions views/sessions/session_event_packing.view.lkml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bd29a42

Please sign in to comment.