This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% snapshot historic_fct_web_sessions %} | |
{{ | |
config( | |
target_schema=generate_schema_name('snapshots'), | |
unique_key='date', | |
strategy='check', | |
check_cols=[ | |
'duration_in_s', | |
'page_views', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Based on https://github.com/dbt-labs/dbt-labs-experimental-features/blob/master/snapshot-testing/macros/test_is_null.sql | |
*/ | |
{% macro test_is_null(model, column_name) %} | |
SELECT * | |
FROM {{ model }} | |
WHERE {{ column_name }} IS NOT NULL | |
{% endmacro %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% snapshot snapshot__fct_web_sessions %} | |
{{ | |
config( | |
target_schema=generate_schema_name('snapshots'), | |
unique_key='session_id', | |
strategy='check', | |
check_cols = 'all', | |
invalidate_hard_deletes=True | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This macro is used to generate a query for data regression diffs. The query | |
compares new data (where dbt_valid_to is not null) to old data which is not valid | |
anymore. | |
*/ | |
{% macro | |
snapshot_data_diff( | |
table, | |
unique_key, | |
exclude=[ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.