-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: improve bigquery connector to optionally allow use of gcloud credentials #8590
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
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2ba8788
ENH allow bigquery connector to optionally use gcloud credentials
ichuang 6c44bbc
move gcfp into if clause
ichuang 36f3876
formatting for proper sphinx rendering
ichuang 42f4b48
Add unit tests for gcloud authentication code.
sean-schaefer b0ace12
move import os to top for pep8
ichuang b023a56
Change LooseVersion check for Google Python Client from 1.2.0 to 1.2
sean-schaefer 7ca9160
Merge branch 'master' of https://github.com/ichuang/pandas
sean-schaefer 4e0b0ef
BUG: fix common.is_hashable for NumPy scalars on Python 3
shoyer eb1c4e3
Merge pull request #9473 from shoyer/fix-is_hashable
jreback 97e26c8
Merge pull request #9500 from jreback/clean
jreback d4c4c37
ENH allow bigquery connector to optionally use gcloud credentials.
ichuang e15c752
Merge branch 'master' of https://github.com/ichuang/pandas
sean-schaefer 2a9f77e
Add exception printing for import error.
sean-schaefer b31574a
Adding space to run travis builds again...
sean-schaefer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"credential": { | ||
"_class": "OAuth2Credentials", | ||
"_module": "oauth2client.client", | ||
"access_token": "ya29.xXx", | ||
"client_id": "1112223456.apps.googleusercontent.com", | ||
"client_secret": "aBc467", | ||
"id_token": { | ||
"at_hash": "OlAp__aV", | ||
"aud": "1112223456.apps.googleusercontent.com", | ||
"azp": "1112223456.apps.googleusercontent.com", | ||
"cid": "1112223456.apps.googleusercontent.com", | ||
"email": "[email protected]", | ||
"email_verified": true, | ||
"exp": 1414558238, | ||
"iat": 1414554338, | ||
"id": "113403125016275849302", | ||
"iss": "accounts.google.com", | ||
"sub": "113403125016229475663", | ||
"token_hash": "OlAp__aV", | ||
"verified_email": true | ||
}, | ||
"invalid": @INVALID@, | ||
"refresh_token": "1/asf87bbEGsb78", | ||
"revoke_uri": "https://accounts.google.com/o/oauth2/revoke", | ||
"token_expiry": "2014-10-29T04:50:38Z", | ||
"token_response": { | ||
"access_token": "ya29.bYsadfiU8542B5", | ||
"expires_in": 3600, | ||
"id_token": { | ||
"at_hash": "OlAp__aV", | ||
"aud": "11112233456.apps.googleusercontent.com", | ||
"azp": "11112223456.apps.googleusercontent.com", | ||
"cid": "11112223456.apps.googleusercontent.com", | ||
"email": "[email protected]", | ||
"email_verified": true, | ||
"exp": 1414558238, | ||
"iat": 1414554338, | ||
"id": "11340312501621345098732", | ||
"iss": "accounts.google.com", | ||
"sub": "1134031250162435660892", | ||
"token_hash": "OlAp__aV", | ||
"verified_email": true | ||
}, | ||
"refresh_token": "1/6v6asdf6NrR92", | ||
"token_type": "Bearer" | ||
}, | ||
"token_uri": "https://accounts.google.com/o/oauth2/token", | ||
"user_agent": "Cloud SDK Command Line Tool" | ||
}, | ||
"key": { | ||
"account": "[email protected]", | ||
"clientId": "11112223456.apps.googleusercontent.com", | ||
"scope": "https://www.googleapis.com/auth/appengine.admin https://www.googleapis.com/auth/bigquery https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/ndev.cloudman https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.admin https://www.googleapis.com/auth/prediction https://www.googleapis.com/auth/projecthosting", | ||
"type": "google-cloud-sdk" | ||
} | ||
} | ||
], | ||
"file_version": 1 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 not safe on windows. I don't recall exactly what you need to do, but I think you have to use the HOME env variable, then use
os.join
to construct paths.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.
Doesn't the expanduser on line 150 take care of that? From https://docs.python.org/2/library/os.path.html#os.path.expanduser:
"On Unix and Windows, return the argument with an initial component of ~ or ~user replaced by that user‘s home directory."
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.
hmm, yeah prob does. ok
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.
@ichuang Can we have those imports moved to the top to conform with PEP8?