1
votes

When there are two projects under two different billing accounts, and there is authorized view across the two projects, which billing account will be billed for the query cost on the views?

Scenario: Project A contains the views use Project B's dataset which contains the actual data. When analysts run queries in Project A, the query cost will be billed in Project A's billing account, or will be billed in Project B's billing account?

This documentation (https://cloud.google.com/bigquery/docs/share-access-views) doesn't specify which account will be billed.

2

2 Answers

4
votes

After a deeper investigation and some test scenarios, I have confirmed that the billing charges related to the query jobs are applied to the Billing account associated to the project that executes the query; however, the view owner keeps getting the charges related to the storage of the source data. Based on this, since the Project A's analysts are using the resources, these tasks will be charged to this project. You can take a look on the BigQuery pricing documentation that contains the following information about this matter:

  • How charges are billed

Each project you create has a billing account attached to it. Any charges incurred by BigQuery jobs run in the project (such as query jobs) are billed to the attached billing account. This is true even if project resources are shared with others outside your organization. BigQuery storage costs are also billed to the attached billing account.

2
votes

Billing charges will be applied to the billing project of the account which executes the job - no matter who is the owner of the view!!!

If you use BigQuery UI (either Classic or New one) - this is easy to figure out which project gets billed - this is so called current or active project and it is the project that is on the top of Navigation Panel

If you are running query via API or any client - you usually set the active project (the project containing respective job which can be different from project of destination table if any or project(s) of resource tables, etc.)

Note: this answer quite contradict to previously given answer - which I believe mostly incorrect! - I mean the first paragraph of the answer - the quote at the end of the answer is obviously correct - but conclusion represented in first paragraph is plain wrong!