-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbt_project.yml
230 lines (208 loc) · 5.9 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: "shoppad"
version: "1.0.0"
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: "shoppad"
dbt-cloud:
project-id: 184721
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["custom_tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_packages"
on-run-start:
- "{{ url_decode_udf() }}"
vars:
"dbt_date:time_zone": "America/Los_Angeles"
pro_apps:
- sms
- email
- custom
- segment
- hubspot
- salesforce
- twilio
- odoo
- recharge
- recharge_legacy
- api
- webhook
- json_webhook
- quickbooks
- gorgias
- ftp
- image
- openai
- chatgpt
- shipstation
- api
- airtable
- data
- dalle
- square
- klaviyo
- gorgias
- webrequest
puc_apps:
- infiniteoptions
- tracktor
- googlesheets
- recharge
glue_apps:
- transform
- filter
- loop
- delay
- logs
- iterator
etl_fields:
[
"__HEVO__DATABASE_NAME",
"__HEVO__INGESTED_AT",
"__HEVO__LOADED_AT",
"__HEVO__MARKED_DELETED",
"__HEVO_ID",
]
activation_workflow_run_count: 1
start_date: "2018-01-01"
ugly_segment_fields:
[
uuid_ts,
context_library_name,
context_library_version,
event,
event_text,
sent_at,
received_at,
original_timestamp,
]
zombie_store_shopify_plans: [frozen, fraudulent, paused, dormant, cancelled]
dbt_segment:
segment_page_views_table: "{{ source('mesa_segment', 'pages') }}"
segment_sessionization_trailing_window: 3
segment_inactivity_cutoff: 30 * 60
segment_pass_through_columns: []
seeds:
+schema: seed_data
shoppad:
custom_app_daily_revenues:
+column_types:
first_dt: DATE
last_dt: DATE
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
# In this example config, we tell dbt to build all models in the example/ directory
# as tables. These settings can be overridden in the individual model files
# using the `{{ config(...) }}` macro.
models:
shoppad:
+persist_docs:
relation: true
columns: true
+transient: true
+materialized: table
+dbt-osmosis: "_model.yml"
# Config indicated by + and applies to all files under models/example/
# example:
# +materialized: view
generic:
+schema: support
#staging:
# stg_shop_infos:
# +on_schema_change: "sync_all_columns"
# +unique_key: shop_subdomain
mesa:
marts:
step_runs:
+on_schema_change: "sync_all_columns"
+cluster_by: ["shop_subdomain"]
+unique_key: step_run_id
+materialized: incremental
workflow_runs:
+cluster_by: ["shop_subdomain", "workflow_id"]
+unique_key: workflow_run_id
+materialized: incremental
workflows:
+unique_key: workflow_id
shops:
+unique_key: shop_subdomain
intermediate:
# +materialized: "{{ 'view' if target.name in ['prod', 'default'] else 'table' }}"
+schema: support
int_shop_calendar:
int_step_runs:
+materialized: incremental
+on_schema_change: "sync_all_columns"
+unique_key: step_run_id
+cluster_by: ["workflow_run_id"]
int_test_step_runs:
+materialized: incremental
+on_schema_change: "sync_all_columns"
+unique_key: test_step_run_id
int_test_runs:
+materialized: incremental
+on_schema_change: "sync_all_columns"
+unique_key: test_run_id
int_workflow_runs:
+on_schema_change: "sync_all_columns"
+unique_key: workflow_run_id
+cluster_by: ["shop_subdomain"]
+materialized: incremental
int_shops:
+cluster_by: ["date_trunc('day', first_installed_at_pt)"]
+unique_key: shop_subdomain
staging:
# +materialized: "{{ 'view' if target.name in ['prod', 'default'] else 'table' }}"
+schema: support
stg_step_runs:
+materialized: view
# +on_schema_change: "sync_all_columns"
# +unique_key: step_run_id
# +cluster_by: ["workflow_run_id"]
stg_workflows:
+unique_key: workflow_id
stg_workflow_runs:
+materialized: view
# +on_schema_change: "sync_all_columns"
# +unique_key: workflow_run_id
# +cluster_by: ["shop_subdomain"]
stg_shops:
+cluster_by: ["date_trunc('day', first_installed_at_pt)"]
+unique_key: shop_subdomain
mesa_segment:
staging:
+schema: support
stg_segment_first_visits:
+materialized: incremental
+on_schema_change: "sync_all_columns"
+unique_key: shop_subdomain
google_analytics:
staging:
+schema: support
+materialized: view
stg_ga4_events:
+materialized: incremental
+unique_key: event_id
+on_schema_change: "sync_all_columns"
intermediate:
+schema: support
int_ga4_events:
+materialized: incremental
+unique_key: event_id
+on_schema_change: "sync_all_columns"
customer_io:
staging:
+schema: support
intermediate:
+schema: support