-
Notifications
You must be signed in to change notification settings - Fork 138
feat: GCP access token support #459
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
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just one potential optimization.
@@ -54,6 +55,9 @@ def create_bigquery_client( | |||
) | |||
credentials = credentials.with_scopes(SCOPES) | |||
default_project = credentials.project_id | |||
elif credentials_access_token: | |||
credentials = oauth_credentials.Credentials(credentials_access_token) | |||
_, default_project = google.auth.default(scopes=SCOPES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is potentially a slow operation. I we might consider only doing this if project_id
is None
. Or maybe add a if default_project is None
to the if project_id is None
if statement below?
An optional |
This PR is pretty stale, opting to close since there haven't been responses to the code review comments. Thanks! |
Add support for using a temporary GCP Access Token for authenticating.
Changelog
credentials_access_token
forcreate_engine
Fixes #42 🦕