Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BigQuery flex slot reservations

I'm having trouble understanding slots in BigQuery. The documentation is a lot of marketing and at least for me not very helpful.

Specifically I was looking at Flex slots. This is what I think I understood so far:

If I buy 500 flex slots, I will not have to pay anything for the time being. I have to create a reservation first to apply these slots.

My questions would be:

  • In the BQ UI, how do I define on query time if I want to use flex slots or stay on my on demand pricing?
  • How do I cancel the reservation afterwards, so it's only billed for the time the query runs?

How would I control costs in general?

like image 740
Andii Avatar asked Dec 01 '25 14:12

Andii


1 Answers

  1. There is no way to change constantly between both pricing methods. However, there is a workaround that might work for you:

    Beforehand you need to specify which projects within your organization will be charged using the slots and which will be charged using on-demand billing. Then, you can then swap to the project you want to your query in (so this will determine the billing type used for the query).

    Make sure to give all the projects permission to access to BigQuery resources within the organization.

  2. I understand you mean how to cancel the commitment (bear in mind the difference between commitment and reservation). Commitment is the purchase of Bigquery slots. Reservations are only a way to make divisions of the slots purchased in the commitment so only specific projects or regions can use these slots (as explained in answer 1.)

    If you actually meant commitment for flex slots, you cannot cancel them for 60 seconds after your commitment is active.. Afterward, you can cancel any time and it will stop charging you.

like image 62
Fernando C. Avatar answered Dec 03 '25 11:12

Fernando C.