Commands
ALTER MATERIALIZED VIEW
The ALTER MATERIALIZED VIEW
command modifies the metadata of a materialized view. To use this command, you must own the materialized view.
INFO
To modify the SQL definition of a materialized view, please refer to Alter a streaming job.
Syntax
alteroption
depends on the operation you want to perform on the materialized view. For all supported clauses, see the sections below.
Clause
OWNER TO
Parameter or clause | Description |
---|---|
OWNER TO | This clause changes the owner of the materialized view. Note that this will cascadingly change all related internal objects as well. |
new_user | The new owner you want to assign to the materialized view. |
SET SCHEMA
Parameter or clause | Description |
---|---|
SET SCHEMA | This clause moves the materialized view to a different schema. |
schema_name | The name of the schema to which the materialized view will be moved. |
SET PARALLELISM
Parameter or clause | Description |
---|---|
SET PARALLELISM | This clause controls the degree of parallelism for the targeted streaming job. |
parallelism_number | This parameter can be ADAPTIVE or a fixed number, like 1, 2, 3, etc. Altering the parameter to ADAPTIVE will expand the streaming job’s degree of parallelism to encompass all available units, whereas setting it to a fixed number will lock the job’s parallelism at that specific figure. Setting it to 0 is equivalent to ADAPTIVE. |
RENAME TO
Parameter or clause | Description |
---|---|
RENAME TO | This clause changes the name of the materialized view. |
new_name | The new name of the materialized view. |
SET BACKFILL_RATE_LIMIT
This statement controls the rate limit of a newly created materialized view’s backfilling process from upstream materialized views and sources.
For the specific value of BACKFILL_RATE_LIMIT
, refer to How to view runtime parameters.
Examples
To modify the rate limit of the sources used in the materialized view, please refer to SET SOURCE_RATE_LIMIT.
Was this page helpful?