@@ -38,7 +38,20 @@ authentication methods:
38
38
# The credentials and project_id arguments can be omitted.
39
39
df = pandas_gbq.read_gbq(" SELECT my_col FROM `my_dataset.my_table`" )
40
40
41
- 2. Application Default Credentials via the :func: `google.auth.default `
41
+ 2. If running on `Google Colab <https://colab.research.google.com/ >`_,
42
+ pandas-gbq attempts to authenticate with the
43
+ ``google.colab.auth.authenticate_user() `` method. See the `Getting started
44
+ with BigQuery on Colab notebook
45
+ <https://colab.research.google.com/notebooks/bigquery.ipynb> `_ for an
46
+ example of using this authentication method with other libraries that use
47
+ Google BigQuery.
48
+
49
+ .. note ::
50
+
51
+ To use Colab authentication, install version 1.8.0 or later of the
52
+ ``pydata-google-auth `` package.
53
+
54
+ 3. Application Default Credentials via the :func: `google.auth.default `
42
55
function.
43
56
44
57
.. note ::
@@ -48,10 +61,11 @@ authentication methods:
48
61
user account credentials.
49
62
50
63
A common problem with default credentials when running on Google
51
- Compute Engine is that the VM does not have sufficient scopes to query
52
- BigQuery.
64
+ Compute Engine is that the VM does not have sufficient `access scopes
65
+ <https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam> `_
66
+ to query BigQuery.
53
67
54
- 3 . User account credentials.
68
+ 4 . User account credentials.
55
69
56
70
pandas-gbq loads cached credentials from a hidden user folder on the
57
71
operating system.
@@ -214,5 +228,5 @@ more of the following circumstances:
214
228
(or similar) notebook.
215
229
216
230
If the conditions above apply to you, your needs may be better served
217
- by the content in the `Authentication (Highly Constrained Development Environment)
231
+ by the content in the `Authentication (Highly Constrained Development Environment)
218
232
<authentication_highly_constrained_environments.html> `_ section.
0 commit comments