Skip to content

Commit

Permalink
updated limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders committed Jul 19, 2023
1 parent fe667ba commit 586edd3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
18 changes: 3 additions & 15 deletions website/docs/reference/resource-configs/postgres-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,10 @@ models:

### Limitations

#### Changing materialization to and from "materialized_view"
#### Changing materialization from "materialized_view" to table or 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.
Swapping a materialized view to be a table or view is not supported. The workaround is the manually drop the existing materialized view 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>
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>
25 changes: 25 additions & 0 deletions website/docs/reference/resource-configs/redshift-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,29 @@ models:

</File>

### Limitations

#### Changing materialization to and from "materialized_view"

Swapping an already materialized model to be a materialized view and vise versa.

This works with

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 586edd3

Please sign in to comment.