From 39d0d4b50321df42561b9f5016102d149c258093 Mon Sep 17 00:00:00 2001 From: Emiel Date: Thu, 30 Nov 2023 16:07:20 +0100 Subject: [PATCH] Prepare for release --- CHANGELOG | 26 +++++++++ README.md | 7 ++- dbt_project.yml | 88 +++++++++++++++++-------------- integration_tests/dbt_project.yml | 2 +- 4 files changed, 79 insertions(+), 44 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7742745..e0d2e8c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,29 @@ +snowplow-mobile 1.0.0 (2023-12-05) +--------------------------------------- +## Summary +This version marks a major milestone as we move the package into a 1.0.0 release. The release itself includes some small fixes as well as some overhauled functionality. We've also updated the license. This release also marks the package as stable and production ready. This package will only receive critical bug fixes going forward as we invest our effort in new packages and projects. We also now bump the minimum supported dbt version to 1.6.0. + +From this release onwards, the package is being released under the [Snowplow Community License, Version 1.0](https://docs.snowplow.io/community-license-1.0/). If you are uncertain how it applies to your use case, check our answers to [frequently asked questions](https://docs.snowplow.io/docs/contributing/community-license-faq/). + +## Features +- Migrate base models to the new `base` macros for flexibility and consistency +- Add ability to add custom entity/self-describing event columns to the `base_events_this_run` table for Redshift/Postgres +- Add ability to use a custom session identifier and user identifier +- Add new fields `original_session_id` and `original_device_user_id` to derived tables (where applicable) +- Add ability to pass fields through to derived page views, sessions, and user tables + +## Fixes +- Fix typo in docs (Close #79) + +## Under the hood +- Update license + +## Breaking changes +- We now require a dbt version >=1.6.0 to run this package + +## Upgrading +Bump the snowplow-mobile version in your `packages.yml` file. + snowplow-mobile 0.7.4 (2023-10-04) --------------------------------------- ## Summary diff --git a/README.md b/README.md index cb11d40..0a1da01 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -[![early-release]][tracker-classification] [![License][license-image]][license] [![Discourse posts][discourse-image]][discourse] +[![maintained]][tracker-classification] [![License][license-image]][license] [![Discourse posts][discourse-image]][discourse] ![snowplow-logo](https://raw.githubusercontent.com/snowplow/dbt-snowplow-utils/main/assets/snowplow_logo.png) +> This package is in maintenance mode. This means it will only receive bug fixes and security patches as required. Future development of the Snowplow dbt models is being done in the [Unified Digital](https://docs.snowplow.io/docs/modeling-your-data/modeling-your-data-with-dbt/dbt-models/dbt-unified-data-model/) package which you can get access to via the [Snowplow Data Models Pack](https://snowplow.io/snowplow-data-model-pack/). + # snowplow-mobile This dbt package: @@ -25,6 +27,7 @@ The latest version of the snowplow-mobile package supports BigQuery, Databricks, - A dataset of mobile events from the Snowplow [iOS tracker][ios-tracker] or [Android tracker][android-tracker] must be available in the database. - Have the [session context (iOS)][ios-session-context] or [session context (Android)][android-session-context] and [screen view events (iOS)][ios-screen-views] or [screen view events (Android)][android-screen-views] enabled. +- dbt core version of 1.6.0 or greater ### Installation @@ -82,7 +85,7 @@ This distribution is all licensed under the [Snowplow Community License, Version [license]: https://docs.snowplow.io/community-license-1.0/ [license-image]: http://img.shields.io/badge/license-Snowplow--Community--1-blue.svg?style=flat [tracker-classification]: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/ -[early-release]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Early%20Release&color=014477&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC +[maintained]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Maintained&color=a069d7&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC [ios-tracker]: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/objective-c-tracker/ [android-tracker]: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/android-tracker/ diff --git a/dbt_project.yml b/dbt_project.yml index 4068c33..9fc607c 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,8 +1,8 @@ name: 'snowplow_mobile' -version: '0.7.4' +version: '1.0.0' config-version: 2 -require-dbt-version: [">=1.4.0", "<2.0.0"] +require-dbt-version: [">=1.6.0", "<2.0.0"] profile: 'default' @@ -24,60 +24,66 @@ clean-targets: vars: snowplow_mobile: - # Sources + # See https://docs.snowplow.io/docs/modeling-your-data/modeling-your-data-with-dbt/dbt-configuration/mobile/ for more information and an interactive tool to help you with the variable setup + # Please only add those that you change the values of to your root dbt_project.yml file, do not copy all values as this can lead to unexpected issues + + # WAREHOUSE & TRACKER + # See https://docs.snowplow.io/docs/modeling-your-data/modeling-your-data-with-dbt/dbt-configuration/mobile/ for more information # snowplow__atomic_schema: "atomic_data_sample" # Only set if not using 'atomic' schema for Snowplow events data # 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__dev_target_name: 'dev' 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__events_table: "events" # Only set if not using 'events' table for Snowplow events data 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" + + # OPERATION & LOGIC + snowplow__allow_refresh: false snowplow__backfill_limit_days: 30 - snowplow__app_id: [] - snowplow__platform: ['mob'] - snowplow__session_stitching: true - snowplow__user_stitching_id: 'user_id' - # please refer to the macros within identifiers.sql for default values + snowplow__days_late_allowed: 3 + snowplow__lookback_window_hours: 6 + snowplow__max_session_days: 3 + snowplow__session_lookback_days: 730 snowplow__session_identifiers: [] - snowplow__user_identifiers: [] - - # snowplow__session_sql: 'sc.session_id' # takes priority over session_identifiers + snowplow__session_stitching: true + snowplow__session_timestamp: collector_tstamp # Used to manage utils version higher than 0.15.1, do not change until new base macro is used + snowplow__start_date: "2020-01-01" + snowplow__upsert_lookback_days: 30 + snowplow__user_identifiers: [] # snowplow__user_sql: 'sc.user_id' # takes priority over user identifiers + snowplow__user_stitching_id: 'user_id' - # 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. - # snowplow__enable_mobile_context: false - # snowplow__enable_geolocation_context: false - # snowplow__enable_application_context: false - # snowplow__enable_screen_context: false - # snowplow__enable_app_errors_module: false + # CONTEXTS, FILTERS, & LOGS + snowplow__app_id: [] + snowplow__enable_mobile_context: false + snowplow__enable_geolocation_context: false + snowplow__enable_application_context: false + snowplow__enable_screen_context: false + snowplow__enable_app_errors_module: false + snowplow__has_log_enabled: true + snowplow__platform: ['mob'] snowplow__screen_view_passthroughs: [] snowplow__session_passthroughs: [] snowplow__user_first_passthroughs: [] snowplow__user_last_passthroughs: [] + + # WAREHOUSE SPECIFIC + # Bigquery snowplow__derived_tstamp_partitioned: true - # Variables - Advanced Config - snowplow__lookback_window_hours: 6 - snowplow__session_lookback_days: 730 - snowplow__days_late_allowed: 3 - snowplow__max_session_days: 3 - snowplow__upsert_lookback_days: 30 + # Snowflake snowplow__query_tag: "snowplow_dbt" - snowplow__dev_target_name: 'dev' - snowplow__has_log_enabled: true - snowplow__allow_refresh: false - snowplow__session_timestamp: collector_tstamp # Used to manage utils version higher than 0.15.1, do not change until new base macro is used - - + # Databricks + # Depending on the use case it should either be the catalog (for Unity Catalog users from databricks connector 1.1.1 onwards) or the same value as your snowplow__atomic_schema (unless changed it should be 'atomic') + # snowplow__databricks_catalog: 'hive_metastore' + # Redshift/postgres + snowplow__entities_or_sdes: [] + 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 # Remove models from the manifest during run start. on-run-start: diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index d3d248f..8101121 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'snowplow_mobile_integration_tests' -version: '0.7.4' +version: '1.0.0' config-version: 2 profile: 'integration_tests'