Get started with reservations

Learn how to create a reservation, assign a reservation, and delete a reservation in BigQuery.

You can also purchase a commitment. For more information, see Commitments.

Before you start this tutorial, consider reading Introduction to workload management to understand the basic concepts.


To follow step-by-step guidance for this task directly in the Google Cloud console, click Guide me:

Guide me


Before you begin

  1. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

    You can create a separate Google Cloud project to administer the reservation and give it a descriptive name like bq-COMPANY_NAME-admin.
  2. Make sure that billing is enabled for your Google Cloud project.

  3. Enable the BigQuery Reservation API.

    Enable the API

    For more information, see Enable the BigQuery Reservation API.

  4. In the Google Cloud console, view your slot quotas:

    View your slot quotas

    To purchase slots, you must have enough slot quota for the region in which you want to purchase slots.

    If your slot quota for the region is less than the number of slots you want to purchase, see Request a quota increase.

Create an autoscaling reservation

Create a reservation named prod in the US multi-region, and allocate a maximum of 100 autoscaling slots to it.

  1. In the Google Cloud console, go to the BigQuery page.

    Go to BigQuery

  2. In the navigation panel, go to the Capacity management section.

  3. Click Create reservation.

  4. In the Reservation name field, enter prod.

  5. In the Location drop-down list, select us (multiple regions in United States).

  6. In the Edition list, select Standard. For more information, see Understand BigQuery editions.

  7. For Max reservation size selector, select Small (100 Slots).

  8. Leave the other default setting as they are, and click Save.

To learn how to create a reservation using SQL or the bq tool, see Create a reservation with dedicated slots.

Assign a project to a reservation

Assign a project to the prod reservation. Any query jobs that run from this project will use the pool of slots from the prod reservation. (In this tutorial, you don't run a job.)

You can assign any project that's in the same organization and region as the administration project where you created the reservation.

  1. In the Google Cloud console, go to the BigQuery page.

    Go to BigQuery

  2. In the navigation panel, go to the Capacity management section.

  3. Click the Slot reservations tab.

  4. In the Actions column for the reservation named prod, click Actions.

    Assignments project picker.

  5. Click Create assignment.

  6. In the Select an organization, folder or project section, click Browse.

  7. Browse or search for the project, and then select it.

  8. Click Create.

When you create a reservation assignment, wait at least 5 minutes before running a query. Otherwise the query might be billed using on-demand pricing.

To learn how to assign a project to a reservation using SQL or the bq tool, see Assign a project or folder to a reservation.

Clean up

To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.

Delete the project

The easiest way to eliminate billing is to delete the project that you created for the tutorial.

To delete the project:

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. In the dialog, type the project ID, and then click Shut down to delete the project.

Delete the reservation

When you delete a reservation, any jobs that are currently executing with slots from that reservation will fail. To prevent errors, allow in-flight jobs to complete before deleting the reservation.

  1. In the Google Cloud console, go to the BigQuery page.

    Go to BigQuery

  2. In the navigation panel, go to the Capacity management section.

  3. Click the Slot reservations tab.

  4. For the reservation named prod, click Toggle node.

  5. For each assignment in that reservation, click Actions, and then click Delete.

  6. In the Actions column for the reservation named prod, click Actions.

  7. Click Delete.

To learn how to delete a reservation using SQL or the bq tool, see Delete a reservation.

What's next