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