[CT-1364] [Bug] profiles.yml in project dir doesn't work when running dbt from outside with --project-dir
See original GitHub issueIs this a new bug in dbt-core?
- I believe this is a new bug in dbt-core
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Assume your profiles.yml
is located at the root of your project’s directory. Since dbt 1.3, this is supposed to be the first location dbt looks in. However, running dbt from outside with:
dbt run --project-dir /path/to/project
returns a “profile not found” error.
Expected Behavior
dbt should look for profiles.yml
in the project’s root directory, regardless of whether dbt is ran from the directory itself or from outside.
Steps To Reproduce
- Put profiles.yml in project’s directory
dbt run --project-dir /path/to/project
Relevant log output
No response
Environment
- OS:
- Python:
- dbt:
Which database adapter are you using with dbt?
No response
Additional Context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
[CT-462] [Bug] profiles.yml cannot be profiles.yaml · Issue #5002
Create a new project; Name your profiles file profiles.yaml; Run dbt --profiles-dir /directory/with/profiles/yaml/file/in/it debug ...
Read more >profiles-dir fails for dbt test and dbt compile - dbt Discourse
I have a profiles/profiles.yml under my dbt project. I am able to do dbt run --profiles-dir ./profiles, it'll successfully create tables at ...
Read more >How to set location of profiles.yml and dbt_project.yml files in ...
This command will reassign the location of your profiles.yml to the folder mentioned in /path/to/folder . Once it is done, run: dbt debug...
Read more >Custom path for DBT's profiles.yml - Troubleshooting - Airbyte
When I run my Airbyte sync, I have the following error during dbt phase : Could not find profile named 'normalize' Problem is...
Read more >Setting up dbt™ Projects in Git - Hevo Data
yml, which is created by dbt for your project. This configuration file helps dbt identify the dbt project directory and also how dbt...
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
Indeed our messages got crossed – I started a draft and forgot to check for any responses before hitting “send”!
Your opinion on this is rational and reasonable. For the 5% use case, I buy into your assumption that the project directory rather than the current working directory would be the more common one.
You hit the nail on the head that our design decision was focused on the 95% use case, and we decided leave the 5% use case to be handled with the explicit flags. This allowed the code changes to be much more simple while still retaining the ability for more advanced configuration.
Thank you for your reply! I expressed my humble opinion in my second message above, I think our messages probably got crossed 😃