@@ -10,7 +10,7 @@ Before you begin, you must create a Google Cloud Platform project. Use the
1010the service for free.
1111
1212pandas-gbq `authenticates with the Google BigQuery service
13- <https://cloud.google.com/bigquery/docs/authentication/ > `_ via OAuth 2.0. Use
13+ <https://cloud.google.com/bigquery/docs/authentication> `_ via OAuth 2.0. Use
1414the ``credentials `` argument to explicitly pass in Google
1515:class: `~google.auth.credentials.Credentials `.
1616
@@ -132,6 +132,13 @@ To use service account credentials, set the ``credentials`` parameter to the res
132132 )
133133 df = pandas_gbq.read_gbq(sql, project_id = " YOUR-PROJECT-ID" , credentials = credentials)
134134
135+ Alternatively, you can set ``GOOGLE_APPLICATION_CREDENTIALS `` environment variable to the
136+ full path to the JSON file.
137+
138+ .. code-block :: shell
139+
140+ $ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
141+
135142 Use the :func: `~google.oauth2.service_account.Credentials.with_scopes ` method
136143to use authorize with specific OAuth2 scopes, which may be required in
137144queries to federated data sources such as Google Sheets.
@@ -148,8 +155,10 @@ queries to federated data sources such as Google Sheets.
148155 df = pandas_gbq.read_gbq(... , credentials = credentials)
149156
150157 See the `Getting started with authentication on Google Cloud Platform
151- <https://cloud.google.com/docs/authentication/getting-started> `_ guide for
152- more information on service accounts.
158+ <https://cloud.google.com/docs/authentication/getting-started> `_ guide and
159+ `Google Auth Library User Guide
160+ <https://google-auth.readthedocs.io/en/latest/user-guide.html> `_ for more information
161+ on service accounts.
153162
154163.. _authentication-user :
155164
0 commit comments