You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to reproduce this using the project files and commands below.
Reprex
dbt_project.yml
# other dbt_project.yml content hereseed-paths: ["/full/absolute/path/to/dbt/project/seeds"]
seeds/my_seed.csv
id
1
Commands:
dbt seed
dbt seed
The first command succeeded for me, but the 2nd didn't because the seed file had been overwritten. The file at seeds/my_seed.csv should have been unchanged.
Instead, it overwrote the file which led to an error like this for the 2nd command:
01:21:22 Compilation Error in seed my_seed (/full/path/seeds/my_seed.csv)
Row 7 has 4 values, but Table only has 1 columns.
> in macro materialization_seed_default (macros/materializations/seeds/seed.sql)
> called by seed my_seed (/full/path/seeds/my_seed.csv)
@Myles1 I'm curious if you got this error when running dbt compile, because I could only trigger it when I ran dbt seed or dbt build (along with an absolute path for seed-paths)?
@Myles1 I'm curious if you got this error when running dbt compile, because I could only trigger it when I ran dbt seed or dbt build (along with an absolute path for seed-paths)?
I was able to get dbt compile to overwrite source files by using an absolute path to models
Is this a new bug in dbt-core?
Current Behavior
Running
dbt compile
can overwrite source files with the newly compiled sqlExpected Behavior
Source files will not be changed
Steps To Reproduce
Relevant log output
No response
Environment
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
The text was updated successfully, but these errors were encountered: