Skip to content

Commit

Permalink
BQ MVs are not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders committed Jul 19, 2023
1 parent e1354eb commit dc5ca3b
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions website/docs/reference/resource-configs/bigquery-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -764,48 +764,3 @@ Views with this configuration will be able to select from objects in `project_1.

The `grant_access_to` config is not thread-safe when multiple views need to be authorized for the same dataset. The initial `dbt run` operation after a new `grant_access_to` config is added should therefore be executed in a single thread. Subsequent runs using the same configuration will not attempt to re-apply existing access grants, and can make use of multiple threads.

<VersionBlock firstVersion="1.6">


## Materialized view

The BigQuery adapter supports [materialized views](https://cloud.google.com/bigquery/docs/materialized-views-intro) and refreshes them for every subsequent `dbt run` you execute. For more information, see [Refresh Materialized Views](https://cloud.google.com/bigquery/docs/materialized-views-manage#refresh) in the Google docs.

Materialized views support the optional configuration `on_configuration_change` with the following values:
- `apply` (default) &mdash; attempts to update the existing database object if possible, avoiding a complete rebuild. The following changes can be applied without the need to rebuild the materialized view:
- enable_refresh
- refresh_interval_minutes
- max_staleness
- `skip` &mdash; allows runs to continue while also providing a warning that the model was skipped
- `fail` &mdash; forces runs to fail if a change is detected in a materialized view

You can create a materialized view by editing _one_ of these files:
- the SQL file for your model
- the `dbt_project.yml` configuration file

The following examples create a materialized view:

<File name='models/YOUR_MODEL_NAME.sql'>

```sql
{{
config(
materialized = 'materialized_view',
on_configuration_change = 'apply',
)
}}
```

</File>


<File name='dbt_project.yml'>

```yaml
models:
path:
materialized: materialized_view
```
</File>
</VersionBlock>

0 comments on commit dc5ca3b

Please sign in to comment.