I want to write a dbt command that will select only incremental models that have had a schema change (ie a new column has been added to the source data). The idea is then that I could add that statement as a regular deployment job to do a full refresh on those models. I think some combination of using the state:modified option and other selectors would work, but I haven't had much luck. Does anyone have any suggestions?
select only incremental models that have had a schema change since the last run
The closest you will get is
state:modified.body,config.materialized:incremental
But you will get all SQL changes, not just schema changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With