DBT connection profiles
Mage will look for a file named
profiles.yml located in your DBT project root
For example, if your Mage project is named
demo_project and your DBT project
demo, then your
profiles.yml file for that DBT project should be
If you have a 2nd DBT project (e.g. named
example), the connection profiles
for that project should be located in
For more information on how to configure your connection profiles, read DBT’s documentation.
How connection profiles are used
When you run a single DBT model or
selected DBT models, there is an input field labeled
DBT profile target. The value in that field will be the connection profile
target that Mage uses when running a DBT model block.
The command Mage executes is
dbt run with the flag
--target and the value of
that flag is the value from the input field labeled
DBT profile target.
You can add variables specific to your pipeline. These variables are accessible in each block of your pipeline.
In addition, all the environment variables are accessible within the SQL query
|Get a value from the environment variables.|
|Get a value from the runtime variables.|
DBT profile target
When typing in the DBT profile target for a DBT block, you can explicitly state
the target (e.g.
dev) you want the block to use or you can use variable
interpolation. For example: