Home » Bigquery » Tutorials » Alter materialized view options

BigQuery Alter materialized view set options

Set options on materialized view

Alter materialized view options example

ALTER MATERIALIZED VIEW mydataset.my_mv
SET OPTIONS (
  enable_refresh=true,
  refresh_interval_minutes=20
)

Explanation

  • IF EXISTS: If no dataset exists with that name, the statement has no effect.
  • dataset_name: The name of the dataset to delete.
  • CASCADE: Deletes the dataset and all resources within the dataset, such as tables, views, and functions. You must have permission to delete the resources, or else the statement returns an error
  • RESTRICT: Deletes the dataset only if it's empty. Otherwise, returns an error. If you don't specify either CASCADE or RESTRICT, then the default behavior is RESTRICT

Syntax reference

ALTER MATERIALIZED VIEW [IF EXISTS] materialized_view_name
SET OPTIONS(materialized_view_set_options_list)