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

Release/snowplow media player/0.7.2 #68

Merged
merged 4 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ logs/
.DS_Store
dbt-service-account.json
.vscode/settings.json
integration_tests/package-lock.yml
17 changes: 17 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
snowplow-media-player 0.7.2 (2024-03-18)
rlh1994 marked this conversation as resolved.
Show resolved Hide resolved
---------------------------------------
## Summary
This release makes a few internal tweaks, including adding support for [schema grants](https://docs.snowplow.io/docs/modeling-your-data/modeling-your-data-with-dbt/package-features/table-grants/#granting-usage-on-schemas)

## Features
- Add support for schema grants

## Fix
- Add missing argument in delete from manifest call

## Under the hood
- Enforce full refresh flag to refresh manifest tables

## Upgrading
To upgrade simply bump the snowplow-media-player version in your `packages.yml` file. Note the minimum version of snowplow-utils required is now 0.16.2

snowplow-media-player 0.7.1 (2024-01-26)
---------------------------------------
## Summary
Expand Down
7 changes: 5 additions & 2 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'snowplow_media_player'
version: '0.7.1'
version: '0.7.2'
config-version: 2

require-dbt-version: ['>=1.4.0', '<2.0.0']
Expand Down Expand Up @@ -33,6 +33,8 @@ vars:
# snowplow__atomic_schema: 'atomic' # 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__grant_select_to: []
snowplow__grant_schema_usage: true

# Variables - Operation and logic
snowplow__complete_play_rate: 0.99
Expand Down Expand Up @@ -100,13 +102,14 @@ vars:

# Completely or partially remove models from the manifest during run start.
on-run-start:
- '{{ snowplow_utils.snowplow_delete_from_manifest(var("models_to_remove",[])) }}'
- "{{ snowplow_utils.snowplow_delete_from_manifest(var('models_to_remove',[]), ref('snowplow_media_player_incremental_manifest')) }}"
# Check inconsistencies within the variable setup.
- '{{ snowplow_media_player.config_check() }}'

# Update manifest table with last event consumed per successfully executed node/model
on-run-end:
- '{{ snowplow_utils.snowplow_incremental_post_hook("snowplow_media_player", "snowplow_media_player_incremental_manifest", "snowplow_media_player_base_events_this_run", var("snowplow__session_tstamp", "collector_tstamp")) }}'
- "{{ snowplow_utils.grant_usage_on_schemas_built_into(var('snowplow__grant_schemas', true)) }}"

models:
snowplow_media_player:
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'snowplow_media_player_integration_tests'
version: '0.7.1'
version: '0.7.2'
config-version: 2

profile: 'integration_tests'
Expand Down
14 changes: 9 additions & 5 deletions macros/allow_refresh.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ You may obtain a copy of the Snowplow Personal and Academic License Version 1.0

{% macro default__allow_refresh() %}

{% set allow_refresh = snowplow_utils.get_value_by_target(
dev_value=none,
default_value=var('snowplow__allow_refresh'),
dev_target_name=var('snowplow__dev_target_name')
) %}
{% if flags.FULL_REFRESH == True %}
{% set allow_refresh = snowplow_utils.get_value_by_target(
dev_value=none,
default_value=var('snowplow__allow_refresh'),
dev_target_name=var('snowplow__dev_target_name')
) %}
{% else %}
{% set allow_refresh = none %}
{% endif %}

{{ return(allow_refresh) }}

Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: snowplow/snowplow_utils
version: [">=0.15.0", "<0.17.0"]
version: [">=0.16.2", "<0.17.0"]
Loading