With `dbt run` the `--profiles-dir` becomes relative to `--project-dir`
See original GitHub issueDescribe the bug
The --profiles-dir
flag becomes relative to the --project-dir
flag when running dbt run
. It does not for dbt debug
.
Steps To Reproduce
Let’s say we have the profiles.yml
in the current working directory and our dbt project in a sub-directory jaffle-shop
. Then the following command runs without a problem (if all is set-up correctly):
dbt debug --project-dir jaffle-shop/ --profiles-dir .
However, with dbt run
this does not work.
dbt run --project-dir jaffle-shop/ --profiles-dir . # can not find profile
This is because for dbt run
the profiles directory argument becomes relative to the project directory. Ergo, the following does work:
dbt run --project-dir jaffle-shop/ --profiles-dir .. # works unexpectedly
Expected behavior
The --profile-dir
flag should behave the same for all dbt
commands.
Screenshots and log output
N/A
System information
N/A/
The output of dbt --version
:
installed version: 0.19.0
latest version: 0.19.0
Up to date!
Plugins:
- bigquery: 0.19.0
- snowflake: 0.19.0
- redshift: 0.19.0
- postgres: 0.19.0
- sqlserver: 0.19.0.1
The operating system you’re using:
ProductName: macOS
ProductVersion: 11.2.1
BuildVersion: 20D75
The output of python --version
:
Python 3.7.2
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
With `dbt run` the `--profiles-dir` becomes relative to `--project ...
Describe the bug The --profiles-dir flag becomes relative to the --project-dir flag when running dbt run. It does not for dbt debug.
Read more >How to set location of profiles.yml and dbt_project.yml files in ...
The command you'll want to run is: dbt run --project-dir /path/to/new/dbt_project.yml_file --profiles-dir /path/to/new/profiles.yml_file.
Read more >Data Diffs with Meltano and dbt-osmosis
We need dbt to parse, compile, and run a query that uses the compiled SQL from both of these revisions. A simple execution...
Read more >dbt (dagster-dbt)
Sends a request with the method run to the dbt RPC server, and returns the response. For more details, see the dbt docs...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @jtcohen6, just want to mention that I am having a go at this. However, it takes some time to get the environment set-up right before I can start running the tests, soooo it is work in progress 🚧
Hi @jtcohen6, thanks for your response. I was just able to run the tests with the Docker image ✨!
The issue was completely on my side. Docker was quite messed up, e.g. the
ubuntu:14.04
image worked but16.04
,18.04
and20.04
did not. Also some of theapt-get
packages installed well and others did not.Apparently Apple’s Screen Time app was blocking some content 😅, therefore some - not all - Ubuntu registries. After disabling that and struggling some more, I was finally able to run the tests after a reboot of my computer.