nickbeuk
nickbeuk

Reputation: 31

Google Cloud/BigQuery: Is there a way to make sure that each query that runs. runs on the correct project for billing purposes?

I have an organisation on BigQuery and I have multiple projects there. I wanted to do an analysis on my billing exports and found out that some queries that used "FROM project1" were being billed under "project2" for example. Does anyone know a way to make sure that each query (scheduled or not) will be billed under the right project-id?

I tried contacting Google Cloud Support, but they haven't reached out to me with a solution (yet). I have looked through all the bigquery settings but haven't got a clue.

Upvotes: 0

Views: 593

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75940

BigQuery has a typical billing mode that separate the compute and the storage.

  • The data can be stored in a project and the project pay for that storage cost
  • The data can be requested from a project and the processing cost are set on that project.

With that context, there is no technical problem to have data in a project1 and to query them from Project2. You can't block that with BigQuery.

You have to ensure that the permissions are correct (especially for service account to be sure that the service account of project2 can't read the data of project1), or even deactivate the APIs on a project


However, if you have access to project1 and project2, and you can run query jobs in the 2 projects, and the BigQuery API are activated in the 2 projects, you can do nothing to prevent that mistake

Upvotes: 0

Related Questions