forked from dbt-labs/dbt-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample.profiles.yml
182 lines (174 loc) · 5.64 KB
/
sample.profiles.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
# This configuration file specifies information about connections to
# your data warehouse(s). The file contains a series of "profiles."
# Profiles specify database credentials and connection information
#
# By default, dbt looks for this file in ~/.dbt/profiles.yml. That option
# can be configured when dbt is invoked with the --profiles-dir option:
#
# $ dbt run --profiles-dir /opt/dbt/
# Top-level configs that apply to all profiles are set here
config:
send_anonymous_usage_stats: True
use_colors: True
# Profiles configurations should adhere to the structure defined below:
#
# Postgres / Redshift
# -------------------
#
# [profile-name]:
# outputs:
# [target-name]:
# type: {redshift, postgres}
# threads: [1 - 8]
# host: [host ip or fully qualified domain name]
# port: [port]
# user: [user]
# pass: [password]
# dbname: [dbname]
# schema: [schema name]
# target: [target-name]
#
#
# Snowflake
# -------------------
#
# [profile-name]:
# outputs:
# [target-name]:
# type: snowflake
# threads: [1 - 8]
# account: [url prefix for your snowflake connection]
#
# user: [user]
# password: [password]
# role: [optional, the snowflake role you want to use]
#
# database: [db name]
# warehouse: [warehouse]
# schema: [schema name]
# target: [target-name]
#
#
# BigQuery
# -------------------
# [profile-name]:
# target: [target-name]
#
# outputs:
# # 1. Use oauth flow
# [target-name-1]:
# type: bigquery
# method: oauth
# project: [GCP project id]
# schema: [dbt schema]
# threads: [between 1 and 8]
# timeout_seconds: 300
#
# # 2. use a service account keyfile
# [target-name-2]:
# type: bigquery
# method: service-account
# project: [GCP project id]
# schema: [dbt schema]
# threads: [between 1 and 8]
# keyfile: [/path/to/bigquery/keyfile.json]
#
# # 3. Use the contents of the service account keyfile (advanced)
# [target-name-3]:
# type: bigquery
# method: service-account-json
# project: [GCP project id]
# schema: [dbt schema]
# threads: [between 1 and 8]
#
# # These fields come from the service account json keyfile
# keyfile_json:
# type: xxx
# project_id: xxx
# private_key_id: xxx
# private_key: xxx
# client_email: xxx
# client_id: xxx
# auth_uri: xxx
# token_uri: xxx
# auth_provider_x509_cert_url: xxx
# client_x509_cert_url: xxx
#
#
# Commonly, it's helpful to define multiple targets for a profile. For example,
# these targets might be `dev` and `prod`. Whereas the `dev` target points to
# a development schema (eg. dbt_dev), the `prod` schema should point to the
# prod schema (eg. analytics). Analytical/BI tools should point to the
# prod schema so that local development does not interfere with analysis.
#
# The following are some examples of well-formatted profile configurations
evil-corp:
outputs:
dev: # specify the dev connection
type: redshift
threads: 1
host: 12.34.56.78
port: 5439
user: elliot
pass: pa55word
dbname: warehouse
schema: dbt_elliot # use the dev schema
prod: # specify the prod connection
type: redshift
threads: 1
host: 12.34.56.78
port: 5439
user: elliot
pass: pa55word
dbname: warehouse
schema: analytics # use the prod schema instead
snowflake: # specify the snowflake connection
type: snowflake
threads: 1
account: evilcorp # the url prefix for your snowflake connection,
# i.e. evilcorp.snowflakecomputing.com
user: elliot
password: pa55word
role: SYSADMIN # optional, the snowflake role you want to use
# when connecting
database: db
warehouse: warehouse
schema: analytics # use the prod schema instead
bigquery:
type: bigquery
method: oauth
project: evil-corp
schema: analytics
threads: 1
target: dev # default target is dev unless changed at run time
mr-robot:
outputs:
dev: # specify the dev connection
type: postgres
threads: 2
host: 87.65.43.21
port: 5439
user: mr_robot
pass: password1
dbname: warehouse
schema: dbt_mr_robot # use the dev schema
prod: # specify the prod connection
type: postgres
threads: 1
host: 87.65.43.21
port: 5439
user: mr_robot
pass: password1
dbname: warehouse
schema: analytics # use the prod schema instead
target: dev # default target is dev unless changed at run time
# You can switch between profiles and targets on the command line. All of the
# following are valid ways to invoke dbt run/test/compile/etc
#
# $ dbt run --profile evil-corp
# $ dbt run --profile evil-corp --target dev
# $ dbt run --profile evil-corp --target prod
#
# $ dbt run --profile mr-robot
# $ dbt run --profile mr-robot --target dev
# $ dbt run --profile mr-robot --target prod