bigquery.dataUser
bigquery.dataViewer
bigquery.dataEditor
bigquery.dataOwner
bigquery.admin
Getting a list of table snapshots in a dataset is similar to listing other types of tables. The table snapshots have the type SNAPSHOT
.
You can list table snapshots by using one of the following options:
In the Google Cloud console, go to the BigQuery page.
In the Explorer pane, expand the project and dataset nodes of the dataset whose table snapshots you want to list.
You can identify the table snapshots in the dataset by their icon.
Query the INFORMATION_SCHEMA.TABLE_SNAPSHOTS
view:
In the Google Cloud console, go to the BigQuery Studio page.
In the query editor, enter the following statement:
SELECT*FROMPROJECT_ID.DATASET_NAME.INFORMATION_SCHEMA.TABLE_SNAPSHOTS;
Replace the following:
PROJECT_ID
: the project ID of the project that contains the snapshots you want to list.DATASET_NAME
: the name of the dataset that contains the snapshots you want to list.Click
Run.For more information about how to run queries, see Run an interactive query.
The result looks similar to the following:
+---------------+----------------+------------------+--------------------+-------------------+-----------------+-----------------------------+ | table_catalog | table_schema | table_name | base_table_catalog | base_table_schema | base_table_name | snapshot_time | +---------------+----------------+------------------+--------------------+-------------------+-----------------+-----------------------------+ | myproject | mydataset | mysnapshot | basetableproject | basetabledataset | basetable | 2021-04-16 14:05:27.519 UTC | +---------------+----------------+------------------+--------------------+-------------------+-----------------+-----------------------------+
Enter the following command in the Cloud Shell:
bqls\PROJECT_ID:DATASET_NAME
Replace the following:
PROJECT_ID
: the project ID of the project that contains the snapshots you want to list.DATASET_NAME
: the name of the dataset that contains the snapshots you want to list.The output looks similar to the following:
+-------------------------+--------+---------------------+-------------------+ | tableId | Type | Labels | Time Partitioning | +-------------------------+--------+---------------------+-------------------+ | mysnapshot |SNAPSHOT| | | +-------------------------+--------+---------------------+-------------------+
Call the tables.list
method with the following parameters:
Parameter | Value |
---|---|
projectId | The project ID of the project that contains the snapshots you want to list. |
datasetId | The name of the dataset that contains the snapshots you want to list. |
You can list the table snapshots of a specified base table by querying the INFORMATION_SCHEMA.TABLE_SNAPSHOTS
view:
SELECT*FROMPROJECT_ID.DATASET_NAME.INFORMATION_SCHEMA.TABLE_SNAPSHOTSWHEREbase_table_name='books';
Replace the following:
PROJECT_ID
: the project ID of the project that contains the snapshots you want to list.DATASET_NAME
: the name of the dataset that contains the snapshots you want to list.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-17 UTC.