In our dbt setup, developers run test builds that clone / create models into their dev schemas. When a developer is testing a dynamic table, it’ll build that table into their dev schema which means it will auto-refresh based on the configured lag.
Is there a way to automatically suspend a dynamic table if it’s built in a dev environment, such as with a config parameter? One way I was thinking about this was using on-run-end to detect the dev environment + materialization type across all models, but that seems clunky / overkill to have to loop over every model. I’d also rather not have to include a config for every dynamic model.
you may have figured out a way to do this but for others landing here, we’ve been using this macro to set config for all of our dynamic tables that extends the normal config macro. forcing DOWNSTREAM allows our tables to create in dev and never refresh on their own as they won’t have any tables relying on them with a schedule.