Where Does dbt Store profiles.yml?
dbt connection profiles live in profiles.yml inside ~/.dbt, separate from the project folder. Lookup order plus all three desktop paths.
Last updated
dbt splits configuration in two on purpose. The project folder holds dbt_project.yml plus models, tests and seeds, and belongs in git. Connection secrets live separately in profiles.yml inside a .dbt directory, which stays out of version control.
Lookup order decides which file wins: DBT_PROFILES_DIR first, then the project .dbt folder, then ~/.dbt. Most local confusion comes from editing one profiles.yml while dbt reads another. The logs folder beside it records every invocation, which helps when a run fails silently.
Where dbt stores this, by platform
%USERPROFILE%\.dbt\profiles.yml
Connection profiles plus logs/ and the packages cache nearby. Paste %USERPROFILE%\.dbt into the Explorer bar. The project folder with dbt_project.yml lives wherever you cloned it, often elsewhere entirely.
~/.dbt/profiles.yml
Same lookup order as Linux. Homebrew and pip installs agree on it. Keep this file out of git and out of screenshots, since it holds warehouse passwords.
~/.dbt/profiles.yml
Default home when DBT_PROFILES_DIR is unset and no project .dbt folder exists. Credentials here apply to every project on the machine, which is convenient and mildly dangerous.
Frequently asked questions
How do I point dbt at a different profiles file?
Set DBT_PROFILES_DIR to the directory holding profiles.yml. This beats both the project .dbt folder and the home default, which makes it the clean way to inject CI credentials.
Does copying profiles.yml back up my data?
Yes. The profile only stores how to reach the warehouse, and the warehouse holds the data. Copying profiles.yml moves connections, never tables. Real project backup is the git repo with dbt_project.yml and the models.
Notice an outdated path? Let us know.