From db01d7e23371f02c84bd00646e47e8e67c4b77b4 Mon Sep 17 00:00:00 2001 From: Anders Swanson Date: Wed, 19 Jul 2023 13:42:01 -0400 Subject: [PATCH] add postgres limitation --- .../resource-configs/postgres-configs.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/docs/reference/resource-configs/postgres-configs.md b/website/docs/reference/resource-configs/postgres-configs.md index cd45e02560c..e39fd50764e 100644 --- a/website/docs/reference/resource-configs/postgres-configs.md +++ b/website/docs/reference/resource-configs/postgres-configs.md @@ -150,4 +150,24 @@ models: +### Limitations + +#### Changing materialization to and from "materialized_view" + +Swapping an already materialized model to be a materialized view and vise versa. The workaround is the manually drop the existing materialization in the data warehouse before calling `dbt run` again. + +To illustrate, assume for the example model below, `my_model`, that it has already been materialized to the underlying data platform via `dbt run`. If a user then changes the model's config to be `materialized="materialized_view"`, they will get an error. The workaround is to execute `DROP TABLE my_model` on the data warehouse before trying the model again. + + + +```yaml + +{{ config( + materialized="table" # or any model type eg view, incremental +) }} + +``` + + +