Skip to content

Conversation

chalmerlowe
Copy link
Collaborator

This PR adds the credentials and project property to the BigQueryClient class as a response to a comment on a previous PR.

Project: Comment about making project a property
Credentials: Comment about adding credentials

@chalmerlowe chalmerlowe requested review from a team as code owners September 4, 2025 12:41
@chalmerlowe chalmerlowe requested review from tswast and removed request for a team September 4, 2025 12:41
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels Sep 4, 2025
@chalmerlowe chalmerlowe assigned chalmerlowe and unassigned Neenu1995 Sep 4, 2025
@chalmerlowe chalmerlowe marked this pull request as draft September 4, 2025 12:45
@chalmerlowe
Copy link
Collaborator Author

Need to add unit tests for this functionality.

/en/latest/user-guide.html#obtaining-credentials
"""
if self._properties["credentials"] is None:
self._properties["credentials"], _ = google.auth.default()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google.auth can be a relatively expensive call. Many years ago, it was regularly taking 30+ seconds. It's thankfully usually faster than that, but still is something we should aim to do once if possible.

@chalmerlowe
Copy link
Collaborator Author

Overtaken by events. Superceded by another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants