I have a few csv files that I’ve loaded as seeds. Because they are relatively static mappings I do not need to load these files each time I run my models. However, I’d prefer not to delete them from the seed folder either because once every couple months I will probably need to update them. I attempted to run dbt build --exclude seeds
, but the logs still showed the seeds running. Wondering if there is a simple/elegant way to achieve this or if I’m missing something obvious (fairly new to dbt)
dbt build --exclude {path to seed files, e.g seeds/ }
can do the trick
Note: @Chris Rhinehart
originally posted this reply in Slack. It might not have transferred perfectly.
I don’t think Chris’ suggestion works, as I think it assumes it’s starting from inside the models
directory for path traversal.
In general, it’s not necessary to try to avoid building seeds etc. The good thing about dbt is that you describe the way you want your project to look, and it makes that happen. Keeping track of whether a seed has changed or not is the sort of mental overhead that dbt wants to save you from, especially for tiny csv files which don’t have much compute overhead to reload.
With that said, if you want to avoid rebuilding unchanged nodes unnecessarily, you could look into using the state:modified selector instead