Skip to main content

bi_reservation

Creates, updates, deletes, gets or lists a bi_reservation resource.

Overview

Namebi_reservation
TypeResource
Idgoogle.bigqueryreservation.bi_reservation

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the singleton BI reservation. Reservation names have the form projects/{project_id}/locations/{location_id}/biReservation.
preferredTablesarrayOptional. Preferred tables to use BI capacity for.
sizestring (int64)Optional. Size of a reservation, in bytes.
updateTimestring (google-datetime)Output only. The last update timestamp of a reservation.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_bi_reservationselectprojectsId, locationsIdRetrieves a BI reservation.
update_bi_reservationupdateprojectsId, locationsIdupdateMaskUpdates a BI reservation. Only fields specified in the field_mask are updated. A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves a BI reservation.

SELECT
name,
preferredTables,
size,
updateTime
FROM google.bigqueryreservation.bi_reservation
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required;

UPDATE examples

Updates a BI reservation. Only fields specified in the field_mask are updated. A singleton BI reservation always exists with default size 0. In order to reserve BI capacity it needs to be updated to an amount greater than 0. In order to release BI capacity reservation size must be set to 0.

UPDATE google.bigqueryreservation.bi_reservation
SET
data__name = '{{ name }}',
data__size = '{{ size }}',
data__preferredTables = '{{ preferredTables }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
preferredTables,
size,
updateTime;