-
Notifications
You must be signed in to change notification settings - Fork 147
Expand file tree
/
Copy pathprofiles.yml.j2
More file actions
212 lines (196 loc) · 5.57 KB
/
Copy pathprofiles.yml.j2
File metadata and controls
212 lines (196 loc) · 5.57 KB
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
{#- ── Target macros ──────────────────────────────────────────────────
Each target is defined once as a macro so both profiles stay in sync.
We avoid YAML merge keys (<<: *anchor) because dbt-fusion's parser
does not resolve them, causing "dbt1005: missing 'type' field" errors.
-#}
{%- macro postgres_target(schema) %}
postgres:
type: postgres
host: 127.0.0.1
port: 5432
user: admin
password: admin
dbname: postgres
schema: {{ schema }}
threads: 32
{%- endmacro %}
{%- macro clickhouse_target(schema) %}
clickhouse:
type: clickhouse
host: localhost
port: 8123
user: default
password: default
schema: {{ schema }}
threads: 4
{%- endmacro %}
{%- macro trino_target(schema) %}
trino:
type: trino
method: none
host: localhost
port: 8086
user: admin
database: iceberg
schema: {{ schema }}
threads: 4
{%- endmacro %}
{%- macro dremio_target(schema) %}
dremio:
type: dremio
software_host: localhost
port: 9047
user: dremio
password: dremio123
use_ssl: false
datalake: S3Source
root_path: datalake.elementary_ci.{{ schema_name }}
database: elementary_ci
schema: {{ schema }}
threads: 4
{%- endmacro %}
{%- macro spark_target(schema) %}
spark:
type: spark
method: thrift
host: 127.0.0.1
port: 10000
user: dbt
schema: {{ schema }}
file_format: delta
threads: 4
{%- endmacro %}
{%- macro duckdb_target(schema) %}
duckdb:
type: duckdb
path: ":memory:"
schema: {{ schema }}
threads: 8
{%- endmacro %}
{%- macro sqlserver_target(schema) %}
sqlserver:
type: sqlserver
driver: "ODBC Driver 18 for SQL Server"
server: 127.0.0.1
port: 1433
database: master
schema: {{ schema }}
user: sa
password: "Elementary123!"
encrypt: false
trust_cert: true
threads: 4
{%- endmacro %}
{%- macro vertica_target(schema) %}
vertica:
type: vertica
host: localhost
port: 5433
username: dbadmin
password: vertica
database: elementary_tests
schema: {{ schema }}
connection_load_balance: false
retries: 2
threads: 4
{%- endmacro %}
{%- macro snowflake_target(schema) %}
snowflake:
type: snowflake
account: {{ snowflake_account | toyaml }}
user: {{ snowflake_user | toyaml }}
password: {{ snowflake_password | toyaml }}
role: {{ snowflake_role | toyaml }}
database: {{ snowflake_database | toyaml }}
warehouse: {{ snowflake_warehouse | toyaml }}
schema: {{ schema }}
threads: 4
{%- endmacro %}
{%- macro bigquery_target(dataset) %}
bigquery:
type: bigquery
method: service-account-json
project: {{ bigquery_project | toyaml }}
dataset: {{ dataset }}
keyfile_json: {{ bigquery_keyfile | toyaml }}
location: US
priority: interactive
threads: 4
{%- endmacro %}
{%- macro redshift_target(schema) %}
redshift:
type: redshift
host: {{ redshift_host | toyaml }}
user: {{ redshift_user | toyaml }}
password: {{ redshift_password | toyaml }}
port: {{ redshift_port | toyaml }}
dbname: {{ redshift_dbname | toyaml }}
schema: {{ schema }}
threads: 4
{%- endmacro %}
{%- macro databricks_catalog_target(schema) %}
databricks_catalog:
type: databricks
host: {{ databricks_host | toyaml }}
http_path: {{ databricks_http_path | toyaml }}
catalog: {{ databricks_catalog | toyaml }}
schema: {{ schema }}
auth_type: oauth
client_id: {{ databricks_client_id | toyaml }}
client_secret: {{ databricks_client_secret | toyaml }}
threads: 4
{%- endmacro %}
{%- macro fabric_target(schema) %}
fabric:
type: fabric
driver: "ODBC Driver 18 for SQL Server"
server: {{ fabric_server | toyaml }}
port: 1433
database: {{ fabric_database | toyaml }}
schema: {{ schema }}
authentication: ServicePrincipal
tenant_id: {{ fabric_tenant_id | toyaml }}
client_id: {{ fabric_client_id | toyaml }}
client_secret: {{ fabric_client_secret | toyaml }}
encrypt: true
trust_cert: false
threads: 4
{%- endmacro %}
{%- macro athena_target(schema) %}
athena:
type: athena
s3_staging_dir: {{ athena_s3_staging_dir | toyaml }}
s3_data_dir: {{ athena_s3_data_dir | toyaml }}
region_name: {{ athena_region | toyaml }}
database: awsdatacatalog
schema: {{ schema }}
work_group: oss_tests
threads: 4
{%- endmacro %}
{#- ── Macro that emits all targets for a given schema suffix ─────── -#}
{%- macro all_targets(schema) %}
{{ postgres_target(schema) }}
{{ clickhouse_target(schema) }}
{{ trino_target(schema) }}
{{ dremio_target(schema) }}
{{ spark_target(schema) }}
{{ duckdb_target(schema) }}
{{ sqlserver_target(schema) }}
{{ vertica_target(schema) }}
{{ snowflake_target(schema) }}
{{ bigquery_target(schema) }}
{{ redshift_target(schema) }}
{{ databricks_catalog_target(schema) }}
{{ fabric_target(schema) }}
{{ athena_target(schema) }}
{%- endmacro %}
elementary_tests:
target: postgres
outputs:
{{ all_targets(schema_name) }}
# The root dbt_project.yml uses profile "elementary", so we define the
# same targets but override the schema to <base>_elementary.
elementary:
target: postgres
outputs:
{{ all_targets(schema_name ~ '_elementary') }}