diff --git a/website/docs/docs/build/materializations.md b/website/docs/docs/build/materializations.md index 192284a31ca..67796afdbdb 100644 --- a/website/docs/docs/build/materializations.md +++ b/website/docs/docs/build/materializations.md @@ -109,27 +109,7 @@ When using the `table` materialization, your model is rebuilt as a + + + + + + +```yaml +models: + [](/reference/resource-configs/resource-path): + [+](/reference/resource-configs/plus-prefix)[materialized](/reference/resource-configs/materialized): + [+](/reference/resource-configs/plus-prefix)on_configuration_change: apply | continue | fail +``` + + + + + + + + + + +```yaml +version: 2 + +models: + - name: [] + config: + [materialized](/reference/resource-configs/materialized): + on_configuration_change: apply | continue | fail +``` + + + + + + + + + + +```jinja +{{ config( + [materialized](/reference/resource-configs/materialized)="", + on_configuration_change="apply" | "continue" | "fail" +) }} +``` + + + + + + + +Materializations are implemented following this "drop through" life cycle: +1. If a model does not exist with the provided path, create the new model +2. If a model exists, but has a different type, drop the existing model and create the new model +3. If `--full-refresh` is supplied, replace the existing model regardless of configuration changes and the `on_configuration_change` setting +4. If there are no configuration changes, perform the default action for that type (e.g. apply refresh for a materialized view) +5. Determine whether to apply the configuration changes according to the `on_configuration_change` setting