BigQuery Alter view set options
Changes the view options
Alter view set options example
Create a view that expires in 7 days
ALTER VIEW mydataset.myview SET OPTIONS ( expiration_timestamp=TIMESTAMP_ADD(CURRENT_TIMESTAMP(), INTERVAL 7 DAY), description="View that expires seven days from now" )
Explanation
view_set_options_list:
NAME | VALUE | Explanation |
---|---|---|
expiration_timestamp | TIMESTAMP | Example: expiration_timestamp=TIMESTAMP "2025-01-01 00:00:00 UTC" This property is equivalent to the expirationTime table resource property. |
friendly_name | STRING | Example: friendly_name="my_view" This property is equivalent to the friendlyName table resource property. |
description | STRING | Example: description="a view that expires in 2025" This property is equivalent to the description table resource property. |
labels |
ARRAY |
Example: labels=[("org_unit", "development")] This property is equivalent to the labels table resource property. |
Syntax reference
ALTER VIEW [IF EXISTS] view_name SET OPTIONS(view_set_options_list)