-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbt_project.yml
126 lines (115 loc) · 4.39 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: 'fueled_web'
version: '2.0.0'
config-version: 2
require-dbt-version: [">=1.4.0", "<2.0.0"]
profile: 'integration_tests' # Set to your DTB Profile.
dispatch:
- macro_namespace: dbt
search_order: ['fueled_utils', 'dbt']
model-paths: ["models"]
test-paths: ["tests"]
macro-paths: ["macros"]
docs-paths: ["docs"]
asset-paths: ["assets"]
target-path: "target"
clean-targets:
- "target"
- "dbt_modules"
- "dbt_packages"
vars:
fueled_web:
# Sources
fueled__atomic_schema: 'fueled' # If not `fueled_atomic`, set to to the schema written by Fueled's warehouse adapter
# fueled__database: # Only set if not using target.database for Fueled events data -- WILL BE IGNORED FOR DATABRICKS
fueled__events: "{{ source('fueled_atomic', 'pages')}}" # Set to the source table for page_views written by Fueled's warehouse adapter
#
# TODO:
# The fueled__page_view_context table seems to only be used for dedupping events in fueled_web_base_events_this_run.sql.
# We might be able to get away without it.
# fueled__page_view_context: "{{ source('atomic','com_fueledanalytics_fueled_web_page_1') }}"
#
fueled__sessions_table: "{{ ref('fueled_web_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
fueled__start_date: '2023-03-01'
fueled__min_visit_length: 5
fueled__heartbeat: 10
fueled__backfill_limit_days: 30
fueled__app_id: []
fueled__ua_bot_filter: false # TODO - Implement bot filter.
fueled__derived_tstamp_partitioned: true
fueled__session_stitching: true
fueled__enable_load_tstamp: false # set to false if you are using the postgres loader or earlier than 4.0.0 of the RDB loader
# Variables - Advanced Config
fueled__lookback_window_hours: 6
fueled__session_lookback_days: 730
fueled__days_late_allowed: 3
fueled__max_session_days: 3
fueled__upsert_lookback_days: 30
fueled__query_tag: "fueled_dbt"
fueled__dev_target_name: 'dev'
fueled__allow_refresh: false
# fueled__limit_page_views_to_session: true
# Completely or partially remove models from the manifest during run start.
on-run-start:
- "{{ fueled_utils.fueled_web_delete_from_manifest(var('models_to_remove',[])) }}"
# Update manifest table with last event consumed per sucessfully executed node/model
on-run-end:
- "{{ fueled_utils.fueled_incremental_post_hook('fueled_web') }}"
# Tag 'fueled_web_incremental' allows fueled_incremental_post_hook to identify Fueled models
# and add their last sucessfull collector_tstamp to the manifest.
models:
fueled_web:
+materialized: table
+file_format: delta
+bind: false
base:
manifest:
+schema: "fueled_manifest"
scratch:
+schema: "scratch"
+tags: "scratch"
bigquery:
enabled: "{{ target.type == 'bigquery' | as_bool() }}"
databricks:
enabled: "{{ target.type in ['databricks', 'spark'] | as_bool() }}"
default:
enabled: "{{ target.type in ['redshift', 'postgres'] | as_bool() }}"
snowflake:
enabled: "{{ target.type == 'snowflake' | as_bool() }}"
page_views:
+schema: "derived"
+tags: "fueled_web_incremental"
scratch:
+schema: "scratch"
+tags: "scratch"
bigquery:
enabled: "{{ target.type == 'bigquery' | as_bool() }}"
databricks:
enabled: "{{ target.type in ['databricks', 'spark'] | as_bool() }}"
default:
enabled: "{{ target.type in ['redshift', 'postgres'] | as_bool() }}"
snowflake:
enabled: "{{ target.type == 'snowflake' | as_bool() }}"
sessions:
+schema: "derived"
+tags: "fueled_web_incremental"
scratch:
+schema: "scratch"
+tags: "scratch"
bigquery:
enabled: "{{ target.type == 'bigquery' | as_bool() }}"
databricks:
enabled: "{{ target.type in ['databricks', 'spark'] | as_bool() }}"
default:
enabled: "{{ target.type in ['redshift', 'postgres'] | as_bool() }}"
snowflake:
enabled: "{{ target.type == 'snowflake' | as_bool() }}"
user_mapping:
+schema: "derived"
+tags: "fueled_web_incremental"
users:
+schema: "derived"
+tags: "fueled_web_incremental"
scratch:
+schema: "scratch"
+tags: "scratch"