Skip to content

Commit

Permalink
PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
emielver committed Nov 10, 2023
1 parent 85c339a commit d254b7d
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 377 deletions.
25 changes: 13 additions & 12 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ vars:
# snowplow__database: Only set if not using target.database for Snowplow events data -- WILL BE IGNORED FOR DATABRICKS
# snowplow__events_table: "events" # Only set if not using 'events' table for Snowplow events data
snowplow__events: "{{ source('atomic', 'events') }}"
snowplow__session_context: "com_snowplowanalytics_snowplow_client_session_1"
snowplow__mobile_context: "com_snowplowanalytics_snowplow_mobile_context_1"
snowplow__geolocation_context: "com_snowplowanalytics_snowplow_geolocation_context_1"
snowplow__application_context: "com_snowplowanalytics_mobile_application_1"
snowplow__screen_context: "com_snowplowanalytics_mobile_screen_1"
snowplow__application_error_events: "com_snowplowanalytics_snowplow_application_error_1"
snowplow__screen_view_events: "com_snowplowanalytics_mobile_screen_view_1"
snowplow__session_context: com_snowplowanalytics_snowplow_client_session_1
snowplow__mobile_context: com_snowplowanalytics_snowplow_mobile_context_1
snowplow__geolocation_context: com_snowplowanalytics_snowplow_geolocation_context_1
snowplow__application_context: com_snowplowanalytics_mobile_application_1
snowplow__screen_context: com_snowplowanalytics_mobile_screen_1
snowplow__application_error_events: com_snowplowanalytics_snowplow_application_error_1
snowplow__screen_view_events: com_snowplowanalytics_mobile_screen_view_1
snowplow__sessions_table: "{{ ref('snowplow_mobile_sessions') }}" # Change to your custom sessions table if you have disabled the standard sessions table in favour of a custom version. Advanced config.
# Variables - Standard Config
snowplow__start_date: "2020-01-01"
Expand All @@ -44,6 +44,11 @@ vars:
snowplow__platform: ['mob']
snowplow__session_stitching: true
snowplow__user_stitching_id: 'user_id'
snowplow__session_identifiers: [{'schema' : 'com_snowplowanalytics_snowplow_client_session_1', 'field' : 'session_id', 'prefix': 'sc'}]
# snowplow__session_sql: 'sc.session_id' # takes priority over session_identifiers
snowplow__user_identifiers: [{'schema' : 'com_snowplowanalytics_snowplow_client_session_1', 'field' : 'user_id', 'prefix': 'sc'}]
# snowplow__user_sql: 'sc.user_id' # takes priority over user identifiers

# Setting default values for 3 enrichments below throughout package rather than here
# Workaround for a bug (https://github.com/dbt-labs/dbt-core/issues/3698).
# TODO: Return to having default values here once fixed.
Expand Down Expand Up @@ -77,7 +82,7 @@ on-run-start:

# Update manifest table with last event consumed per sucessfully executed node/model
on-run-end:
- "{{ snowplow_utils.snowplow_incremental_post_hook('snowplow_mobile') }}"
- "{{ snowplow_utils.snowplow_incremental_post_hook('snowplow_mobile', 'snowplow_mobile_incremental_manifest', 'snowplow_mobile_base_events_this_run', var('snowplow__session_timestamp', 'load_tstamp')) }}"


# Tag 'snowplow_mobile_incremental' allows snowplow_incremental_post_hook to identify Snowplow models
Expand Down Expand Up @@ -120,10 +125,6 @@ models:
scratch:
+schema: "scratch"
+tags: "scratch"
default:
enabled: "{{ target.type in ['bigquery', 'databricks', 'snowflake', 'spark'] | as_bool() }}"
redshift_postgres:
enabled: "{{ target.type in ['redshift','postgres'] | as_bool() }}"
sessions:
+schema: "derived"
+tags: "snowplow_mobile_incremental"
Expand Down
136 changes: 0 additions & 136 deletions integration_tests/.scripts/integration_test_w_custom_module.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
}}

{% set sessions_lifecycle_manifest_query = snowplow_utils.base_create_snowplow_sessions_lifecycle_manifest(
session_identifiers=var('snowplow__session_identifiers', [{"schema" : var('snowplow__session_context'), "field" : "session_id"}]),
session_identifiers=var('snowplow__session_identifiers', [{"schema" : var('snowplow__session_context'), "field" : "session_id", 'prefix': 'sc'}]),
session_sql=var('snowplow__session_sql', none),
session_timestamp=var('snowplow__session_timestamp', 'collector_tstamp'),
user_identifiers=var('snowplow__user_identifiers', [{"schema": "atomic", "field" : "domain_userid"}]),
user_identifiers=var('snowplow__user_identifiers', [{'schema' : var('snowplow__session_context'), 'field' : 'user_id', 'prefix': 'sc'}]),
user_sql=var('snowplow__user_sql', none),
derived_tstamp_partitioned=var('snowplow__derived_tstamp_partitioned', true),
days_late_allowed=var('snowplow__days_late_allowed', 3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ with base_query as (
from base_query a
)
select
* except(session_id, device_user_id),
* except(unstruct_event_com_snowplowanalytics_mobile_screen_view_1, session_id, device_user_id),
session_identifier as session_id,
session_id as original_session_id,
user_identifier as device_user_id,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ select
abe.version,
abe.event_index_in_session,

abe.message,
abe.programming_language,
abe.class_name,
abe.exception_name,
abe.is_fatal,
abe.line_number,
abe.stack_trace,
abe.thread_id,
abe.thread_name
abe.app_err_con_message,
abe.app_err_con_programming_language,
abe.app_err_con_class_name,
abe.app_err_con_exception_name,
abe.app_err_con_is_fatal,
abe.app_err_con_line_number,
abe.app_err_con_stack_trace,
abe.app_err_con_thread_id,
abe.app_err_con_thread_name

from app_error_base_events as abe
Loading

0 comments on commit d254b7d

Please sign in to comment.