Reputation: 51
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
Upvotes: 2
Views: 1359
Reputation: 1326
The closest you will get is
state:modified.body,config.materialized:incremental
But you will get all SQL changes, not just schema changes.
Upvotes: 4