Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove user_id from dimension and add it as "metric" in ad views #81

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ events_this_run as (
,ev.user_identifier
,ev.session_identifier
,ev.app_id
,ev.user_id
,ev.play_id
,ev.media_ad_break__break_id as ad_break_id
,ev.media_ad__ad_id as ad_id
Expand All @@ -58,7 +57,8 @@ events_this_run as (
{%- endif -%}
{% endfor -%}
{%- endif %}


,max(ev.user_id) as user_id
,max(ev.media_label) as media_label
,max(ev.media_ad_break__name) as ad_break_name
,max(ev.media_ad_break__break_type) as ad_break_type
Expand All @@ -81,8 +81,8 @@ events_this_run as (
,{{ snowplow_utils.get_string_agg('original_session_identifier', 'ev', is_distinct=True) }} as domain_sessionid_array

from events_this_run as ev
{{ dbt_utils.group_by(n=9+(var('snowplow__ad_views_passthroughs', [])|length)) }}

{{ dbt_utils.group_by(n=10+(var('snowplow__ad_views_passthroughs', [])|length)) }}

)

Expand Down
Loading