Update table snapshot metadata
This document describes how to update the description, expiration date, oraccess policy for a tablesnapshot by using the Google Cloud console, thebq updatecommand, or thetables.patch API.It is intended for users who are familiar withtables andtable snapshots in BigQuery.
Permissions and roles
This section describes theIdentity and Access Management (IAM) permissionsthat you need to update the metadata for a table snapshot, and thepredefined IAM rolesthat grant those permissions.
Permissions
To update a table snapshot's metadata, you need the following permission:
| Permission | Resource |
|---|---|
bigquery.tables.update | The table snapshot |
Roles
The predefined BigQuery roles that provide the requiredpermission are as follows:
| Role | Resource |
|---|---|
Any of the following:bigquery.dataEditorbigquery.dataOwnerbiguqery.admin | The table snapshot |
Limitations
You can update a table snapshot's metadata, but you can't update its databecause table snapshot data is read only. To update a table snapshot's data,you must first restore the table snapshot to a standard table, and then updatethe standard table's data. For more information, seeRestoring table snapshots.
Update a table snapshot's metadata
You can change a table snapshot's description, expiration, and access policiesin the same way as you change a standard table's metadata. Some examples areprovided in the following sections.
Update the description
You can change the description for a table snapshot by using one of thefollowing options:
Console
In the Google Cloud console, go to theBigQuery page.
In the left pane, clickExplorer:

If you don't see the left pane, clickExpand left pane to open the pane.
In theExplorer pane, expand your project, clickDatasets, andthen click the dataset that has the table snapshot.
ClickOverview> Tables, and then click the name of thetable snapshot that you want to update.
Go to theDetails tab, and then clickEdit Details.
In theDescription field, add or update the description for thetable snapshot.
ClickSave.
bq
Enter the following command in the Cloud Shell:
bqupdate\--description="DESCRIPTION"\PROJECT_ID:DATASET_NAME.SNAPSHOT_NAME
Replace the following:
DESCRIPTION: text describing the snapshot. For example,Snapshot after table schema change X..PROJECT_ID: the project ID of the project that contains the snapshot.DATASET_NAME: the name of the dataset that contains the snapshot.SNAPSHOT_NAME: the name of the snapshot.
API
Call thetables.patchmethod with the following parameters:
| Parameter | Value |
|---|---|
projectId | The project ID of the project that contains the snapshot. |
datasetId | The name of the dataset that contains the snapshot. |
tableId | The name of the snapshot. |
Request bodydescription field | Text describing the snapshot. For example,Snapshot after table schema change X. |
Prefer thetables.patch method over thetables.update method because thetables.update method replaces the entireTable resource.
Update the expiration
You can change the expiration of a table snapshot by using one of thefollowing options:
Console
In the Google Cloud console, go to theBigQuery page.
In the left pane, clickExplorer:

In theExplorer pane, expand your project, clickDatasets, andthen click the dataset that has the table snapshot.
ClickOverview> Tables, and then click the name of thetable snapshot that you want to update.
Go to theDetails tab and then clickEdit Details.
In theExpiration time field, enter the new expiration time for thetable snapshot.
ClickSave.
bq
Enter the following command in the Cloud Shell:
bqupdate\--expiration=EXPIRATION_TIME\PROJECT_ID:DATASET_NAME.SNAPSHOT_NAME
Replace the following:
EXPIRATION_TIME: the number of seconds from the current time to the expiration time.PROJECT_ID: the project ID of the project that contains the snapshot.DATASET_NAME: the name of the dataset that contains the snapshot.SNAPSHOT_NAME: the name of the snapshot.
API
Call thetables.patchmethod with the following parameters:
| Parameter | Value |
|---|---|
projectId | The project ID of the project that contains the snapshot. |
datasetId | The name of the dataset that contains the snapshot. |
tableId | The name of the snapshot. |
Request bodyexpirationTime field | The time when the snapshot expires, in milliseconds since the epoch. |
Prefer thetables.patch method over thetables.update method because thetables.update method replaces the entireTable resource.
Update access
You can give a user access to view the data in a table snapshot by usingone of the following options:
Console
In the Google Cloud console, go to theBigQuery page.
In the left pane, clickExplorer:

In theExplorer pane, expand your project, clickDatasets, andthen click the dataset that has the table snapshot.
ClickOverview> Tables, and then click the name of thetable snapshot that you want to share.
In the snapshot pane that appears, clickShare, then clickAddprincipal.
In theAdd principals pane that appears, enter the identifier of theprincipal you want togive access to the table snapshot.
In theSelect a role dropdown, chooseBigQuery, thenBigQuery Data Viewer.
ClickSave.
bq
Enter the following command in the Cloud Shell:
bqadd-iam-policy-binding\--member="user:PRINCIPAL"\--role="roles/bigquery.dataViewer"\PROJECT_ID:DATASET_NAME.SNAPSHOT_NAME
Replace the following:
PRINCIPAL: theprincipal you want to give access to the table snapshot.PROJECT_ID: the project ID of the project that contains the snapshot.DATASET_NAME: the name of the dataset that contains the snapshot.SNAPSHOT_NAME: the name of the snapshot.
API
Call thetables.setIamPolicymethod with the following parameters:
| Parameter | Value |
|---|---|
Resource | projects/PROJECT_ID/datasets/DATASET_NAME/tables/SNAPSHOT_NAME |
| Request body | {"policy":{"bindings":[{"members":["user:PRINCIPAL"],"role":"roles/bigquery.dataViewer"}]}} |
Replace the following:
PROJECT_ID: the project ID of the project that contains the snapshot.DATASET_NAME: the name of the dataset that contains the snapshot.SNAPSHOT_NAME: the name of the snapshot.PRINCIPAL: theprincipal you want to give access to the table snapshot.
What's next
- List the table snapshots in a dataset.
- View the metadata for a table snapshot.
- Delete a table snapshot.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.