RESERVATION_CHANGES view
The INFORMATION_SCHEMA.RESERVATION_CHANGES
view contains a near real-time list
of all changes to reservations within the administration project. Each row
represents a change to a single reservation. For more information, see Introduction to reservations
.
Required permission
To query the INFORMATION_SCHEMA.RESERVATION_CHANGES
view, you need
the bigquery.reservations.list
Identity and Access Management (IAM) permission on the
project.
Each of the following predefined IAM roles includes the required
permission:
- BigQuery Resource Admin (
roles/bigquery.resourceAdmin) - BigQuery Resource Editor (
roles/bigquery.resourceEditor) - BigQuery Resource Viewer (
roles/bigquery.resourceViewer) - BigQuery User (
roles/bigquery.user) - BigQuery Admin (
roles/bigquery.admin)
For more information about BigQuery permissions, see BigQuery IAM roles and permissions .
Schema
The INFORMATION_SCHEMA.RESERVATION_CHANGES
view has the
following schema:
change_timestamp
TIMESTAMP
project_id
STRING
project_number
INTEGER
reservation_name
STRING
ignore_idle_slots
BOOL
action
STRING
CREATE
, UPDATE
, or DELETE
.slot_capacity
INTEGER
user_email
STRING
google
for changes
made by Google. NULL
if the email address is unknown.target_job_concurrency
INTEGER
autoscale
STRUCT
Information about the autoscale capacity of the reservation. Fields include the following:
-
current_slots: the number of slots added to the reservation by autoscaling. -
max_slots: the maximum number of slots that could be added to the reservation by autoscaling.
edition
STRING
primary_location
STRING
secondary_location
STRING
original_primary_location
STRING
labels
RECORD
max_slots
INTEGER
slot_capacity
), idle slots (if ignore_idle_slots
is false), and
autoscale slots. This field is specified by users for using the reservation predictability feature
.scaling_mode
STRING
max_slots
. This field is specified by users for using the reservation predictability feature
.Data retention
This view contains current reservations and deleted reservations that are kept for a maximum of 41 days after which they are removed from the view.
Scope and syntax
Queries against this view must include a region qualifier . If you do not specify a regional qualifier, metadata is retrieved from all regions. The following table explains the region scope for this view:
| View name | Resource scope | Region scope |
|---|---|---|
[ PROJECT_ID
].`region- REGION
`.INFORMATION_SCHEMA.RESERVATION_CHANGES[_BY_PROJECT]
|
Project level | REGION
|
- Optional:
PROJECT_ID: the ID of your Google Cloud project. If not specified, the default project is used. -
REGION: any dataset region name . For example,`region-us`.
Example
The following example gets the history of changes for a given reservation. Use this information to see the list of changes made to a specific reservation, such as creating or deleting the reservation.
SELECT * FROM reservation - admin - project . `region-us` . INFORMATION_SCHEMA . RESERVATION_CHANGES WHERE reservation_name = " my-reservation " ORDER BY change_timestamp DESC ;

