@@ -10,7 +10,7 @@ Before you begin, you must create a Google Cloud Platform project. Use the
10
10
the service for free.
11
11
12
12
pandas-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
14
14
the ``credentials `` argument to explicitly pass in Google
15
15
:class: `~google.auth.credentials.Credentials `.
16
16
@@ -132,6 +132,13 @@ To use service account credentials, set the ``credentials`` parameter to the res
132
132
)
133
133
df = pandas_gbq.read_gbq(sql, project_id = " YOUR-PROJECT-ID" , credentials = credentials)
134
134
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
+
135
142
Use the :func: `~google.oauth2.service_account.Credentials.with_scopes ` method
136
143
to use authorize with specific OAuth2 scopes, which may be required in
137
144
queries to federated data sources such as Google Sheets.
@@ -148,8 +155,10 @@ queries to federated data sources such as Google Sheets.
148
155
df = pandas_gbq.read_gbq(... , credentials = credentials)
149
156
150
157
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.
153
162
154
163
.. _authentication-user :
155
164
0 commit comments