Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for quota project on BigQuery #3181

Closed
Kayrnt opened this issue Sep 25, 2024 · 0 comments · Fixed by #3182
Closed

Add support for quota project on BigQuery #3181

Kayrnt opened this issue Sep 25, 2024 · 0 comments · Fixed by #3182

Comments

@Kayrnt
Copy link
Contributor

Kayrnt commented Sep 25, 2024

What's a quota project?

BigQuery allows to have custom quotas: https://cloud.google.com/bigquery/docs/custom-quotas
For instance, it allows to control the amount of TB that can be queried per user.

What's the default?

The default appears to be quota project_id from the credentials such as in JSON credentials:

{
  "account": "",
  "client_id": "xyz.apps.googleusercontent.com",
  "client_secret": "xyz",
  "quota_project_id":  "my_quota_project",
  "refresh_token": "xyz",
  "type": "authorized_user",
  "universe_domain": "googleapis.com"
}

How it is used?

The BigQuery client from Python SDK has a property that allows to override the quota_project through client_options.
The option is used in https://github.com/googleapis/python-cloud-core/blob/e5fb3ea79ea70d538a97c758a33d0b3ab7d1182c/google/cloud/client/__init__.py#L184-L187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant