1
votes

I have a question on how BigQuery handles slot allocation when running queries from one project that select data from tables in another project.

Let's assume the following scenario.

I have project A which is associated with billing account A I have project B which is associated with billing account B I have user C

User C has been granted permissions to query data in project A and project B.

User C logs on and selects project B from the dropdown at the top. User C then runs a query against project A

From which project will the resources/slots be allocated? Project A or project B? Which project will be billed? Project A or project B?

2
Whichever project is active is the one that is used/billed. So, in this case project B is the answer for both. - Graham Polley
Slot allocation is per billing account, though - not per project. Especially relevant if you have a flat rate. - Martin Weitzmann
@MartinWeitzmann are you sure about this? I can see why this would be the case for flate rate. However, my understanding is that slot allocations happens per project in on-demand. - Uli Bethke

2 Answers

2
votes

From which project will the resources/slots be allocated?

Project B

Which project will be billed?

Project B

Simple way of checking which project is/was "active" for specific query is to open Details Tab and check Job ID - the structure is project:location.id. So project part will tell you which project is/was active for the given query

1
votes

Based on the documentation you will be billed under the billing attached to Project B and the slot usage will be in Project B as well. Regardless whether a view in project B is selecting from a table in project A as long as project B is the active project then you will be billed under the billing attached to project B.

BigQuery Pricing