diff --git a/dbt_project.yml b/dbt_project.yml index f88bac2..8af6483 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'jitsu' -version: '0.1.0' +version: '0.1.1' require-dbt-version: ">=0.20.0" config-version: 2 diff --git a/models/sessions/jitsu_sessions.sql b/models/sessions/jitsu_sessions.sql index 398ef7a..f8ca050 100644 --- a/models/sessions/jitsu_sessions.sql +++ b/models/sessions/jitsu_sessions.sql @@ -58,7 +58,7 @@ agg as ( session_id, user_anonymous_id, - last_value(coalesce(user_anonymous_id, user_id, user_email)) over ({{window_clause}}) as blended_user_id, + last_value(coalesce(user_anonymous_id, user_internal_id, user_email)) over ({{window_clause}}) as blended_user_id, min(_timestamp) over ( {{partition_by}} ) as session_start_timestamp, max(_timestamp) over ( {{partition_by}} ) as session_end_timestamp, count(*) over ( {{partition_by}} ) as pageviews,