dbt-labs / dbt-labs/dbt

[Bug] Running dbt compile can overwrite seed files

Open
#10,886 3 comments 0 reactions 0 assignees View on GitHub
engine:v1 seeds type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### 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

```markdown
- 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.