Skip to content

Commit

Permalink
updated limitations
Browse files Browse the repository at this point in the history
add postgres limitation
  • Loading branch information
dataders committed Jul 19, 2023
1 parent 85ef0e8 commit e1354eb
Show file tree
Hide file tree
Showing 2 changed files with 28 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 @@ -148,4 +148,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>
8 changes: 8 additions & 0 deletions website/docs/reference/resource-configs/redshift-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,12 @@ models:
```
</File>

### Limitations

#### Changing materialization from "materialized_view" to table or view

Swapping a materialized view to be a table or view is not supported. The workaround is to manually drop the existing materialized view in the data warehouse before calling `dbt run` again.

To illustrate, assume for a materialized view, `my_mv.sql`, has already been materialized to the underlying data platform via `dbt run`. If a user then changes the model's config to be `materialized="view"`, they will get an error. The workaround is to execute `DROP MATERIALIZE VIEW my_mv CASCASE` on the data warehouse before trying the model again.

</VersionBlock>

0 comments on commit e1354eb

Please sign in to comment.