User credentials for BigQuery
See original GitHub issueNow that https://github.com/ibis-project/ibis/issues/1528 is implemented, itās possible to send any kind of credentials to use with BigQuery. š But, itās still a bit difficult to use user credentials for BigQuery.
The āapplication default credentialsā used by the BigQuery client library use:
- The metadata server to get credentials on App Engine, Compute Engine, ā¦
- A service account key file, whose path is described by the
GOOGLE_APPLICATION_CREDENTIALS
environment variable (what Google Cloud recommends in their authentication getting started guide). - User credentials from the Cloud SDK
gcloud
command-line tool, but these credentials now raise a warning in the Google Auth layer (mostly because they donāt work for some APIs such as the Vision and Speech APIs).
I propose Ibis add a fourth fall-back option (or even skip 3 altogether) to do end-user authentication itself.
The reason for this is that is makes the getting started experience a lot easier. All theyāll need is Python and the library installed and they can use Ibis with BigQuery with their own credentials. No gcloud
installation or service account needed.
Iāve created a API credentials called āIbis Libraryā in the Ibis GBQ project that we can use for this.
The code at Pandas GBQ https://github.com/pydata/pandas-gbq/blob/993fe55f7e1f44a15b282b415284774310fc530c/pandas_gbq/auth.py#L113-L175 will be useful as a model to follow.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Going to get this in for 1.0.0, which we are shooting to release next week.
Iām converting pandas-gbq to use pydata-google-auth in https://github.com/pydata/pandas-gbq/pull/241.
For Ibis to use it, weāll want to call pydata_google_auth.default() just before we create the BigQuery client if the credentials argument is
None
.We should use the client ID and client secret from the ibis-gbq GCP project.