on_configuration_change
info
This functionality is currently only supported for materialized views on a subset of adapters.
The on_configuration_change config has three settings:
apply(default) — Attempt to update the existing database object if possible, avoiding a complete rebuild.- Note: If any individual configuration change requires a full refresh, a full refresh is performed in lieu of individual alter statements.
 
continue— Allow runs to continue while also providing a warning that the object was left untouched.- Note: This could result in downstream failures as those models may depend on these unimplemented changes.
 
fail— Force the entire run to fail if a change is detected.
- Project file
 - Property file
 - Config block
 
dbt_project.yml
models:
  <resource-path>:
    +materialized: <materialization_name>
    +on_configuration_change: apply | continue | fail
models/properties.yml
version: 2
models:
  - name: [<model-name>]
    config:
      materialized: <materialization_name>
      on_configuration_change: apply | continue | fail
models/<model_name>.sql
{{ config(
    materialized="<materialization_name>",
    on_configuration_change="apply" | "continue" | "fail"
) }}
Materializations are implemented following this "drop through" life cycle:
- If a model does not exist with the provided path, create the new model.
 - If a model exists, but has a different type, drop the existing model and create the new model.
 - If 
--full-refreshis supplied, replace the existing model regardless of configuration changes and theon_configuration_changesetting. - If there are no configuration changes, perform the default action for that type (e.g. apply refresh for a materialized view).
 - Determine whether to apply the configuration changes according to the 
on_configuration_changesetting. 
0