Skip to content

Commit

Permalink
add postgres limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders committed Jul 19, 2023
1 parent 75cce0d commit db01d7e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions website/docs/reference/resource-configs/postgres-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,24 @@ models:

</File>

### 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.

<File name='my_model.sql'>

```yaml
{{ config(
materialized="table" # or any model type eg view, incremental
) }}
```

</File>

</VersionBlock>

0 comments on commit db01d7e

Please sign in to comment.