dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

[Bug] Running dbt compile can overwrite source files

Open Myles1 opened this issue 4 months ago • 0 comments

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

  1. Create a new dbt environment
  2. Create a dbt_project.yml in another directory
  3. Edit the paths in dbt_project.yml to point to the absolute paths in your dbt project
  4. 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

Myles1 avatar Oct 18 '24 22:10 Myles1