dbt-core
dbt-core copied to clipboard
[Bug] Running dbt compile can overwrite source files
Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Running dbt compile
can overwrite source files with the newly compiled sql
Expected Behavior
Source files will not be changed
Steps To Reproduce
- Create a new dbt environment
- Create a dbt_project.yml in another directory
- Edit the paths in dbt_project.yml to point to the absolute paths in your dbt project
- Run dbt compile
Relevant log output
No response
Environment
- OS:MacOS 14.5 (23F79)
- Python:3.11.7
- dbt:1.9.0-b2
Which database adapter are you using with dbt?
bigquery
Additional Context
It looks like I'm not the first to experience this (https://discourse.getdbt.com/t/seeds-overwrites-csv-file-if-outside-directory-containing-yml-files/12972) but I couldn't find a fix anywhere