-
Notifications
You must be signed in to change notification settings - Fork 2
/
dbt_project.yml
75 lines (62 loc) · 4.26 KB
/
dbt_project.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: 'snowplow_attribution'
version: '0.4.0'
config-version: 2
require-dbt-version: [">=1.6.0", "<2.0.0"]
profile: 'default'
dispatch:
- macro_namespace: dbt
search_order: ['snowplow_utils', 'dbt']
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
docs-paths: ["docs"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_packages"
vars:
snowplow_attribution:
# ONLY CHANGE ONCE (full-refresh required if changed for an incremental run)
snowplow__conversion_hosts: [] # Url_hosts to consider, when left empty (default) it considers all
snowplow__path_transforms: {'exposure_path': null} # dictionary of path transforms (and their argument, null if none) to perform on the full conversion path (see create_udfs.sql)
snowplow__path_lookback_steps: 0 # Limit for the number of marketing channels to look at before the conversion (0 = unlimited)
snowplow__path_lookback_days: 30 # Restrict to marketing channels within this many days of the conversion (recommended: 30 / 14 / 7)
snowplow__consider_intrasession_channels: true # false = only considers the channel at the start (first page view) of the session, true = consider multiple channels in the conversion session as well as historical channels
snowplow__channels_to_exclude: [] # Optional filter on which channels to exclude before creating paths (and therefore excluded from attribution analysis), e.g. ['Direct']
snowplow__channels_to_include: [] # Optional filter on which channels to include when creating paths e.g. ['Direct']
snowplow__campaigns_to_exclude: [] # Optional filter on which campaigns to exclude before creating paths (and therefore excluded from attribution analysis), e.g. [''UK Snowplow September']
snowplow__campaigns_to_include: [] # Optional filter on which campaigns to include when creating paths e.g. ['UK Snowplow September']
snowplow__conversion_path_source: "{{ source('derived', 'snowplow_unified_views')}}"
snowplow__conversions_source: "{{ source('derived', 'snowplow_unified_conversions') }}"
snowplow__user_mapping_source: "{{ source('derived', 'snowplow_unified_user_mapping') }}"
snowplow__spend_source: 'not defined' # Optional, needed for the ROAS calculation of the snowplow_attribution.overview. Should be changed to a table reference with 'spend' by 'channel' and/or 'campaign' by 'spend_tstamp' (which denotes a timestamp field) information
snowplow__conversion_stitching: false # When true the view events will be joined to the conversion event based on stitched_user_id. Both conversion and view stitching needs to be enabled in the unified model for it to work properly.
snowplow__conversion_clause: 'cv_value > 0 and ev.user_identifier is not null'
# Variables that change the drop and recompute report tables only
snowplow__conversion_window_start_date: '' # an explicit conversion window start date overwrite
snowplow__conversion_window_end_date: '' # an explicit conversion window end date overwrite
snowplow__conversion_window_days: 30 # last complete nth number of days (calculated from the last processed path in the path source) to dynamically update the conversion_window_start_date and end_date with. Will only apply if both variables are left as an empty string.
snowplow__attribution_list: ['first_touch', 'last_touch', 'linear', 'position_based']
snowplow__attribution_start_date: '2023-01-01'
snowplow__enable_attribution_overview: true
snowplow__enable_paths_to_non_conversion: false
snowplow__allow_refresh: false
snowplow__dev_target_name: 'dev'
snowplow__grant_select_to: []
snowplow__grant_schema_usage: true
on-run-start: "{{ create_udfs() }}"
on-run-end:
- "{{ snowplow_utils.grant_usage_on_schemas_built_into(var('snowplow__grant_schemas', true)) }}"
models:
snowplow_attribution:
+file_format: "{{ 'delta' if target.type not in ['spark'] else 'iceberg'}}"
+incremental_strategy: "{{ none if target.type not in ['spark'] else 'merge' }}"
+schema: "derived"
+materialized: table
manifest:
+schema: "snowplow_manifest"
optional_reporting:
+enabled: false