Skip to content

Commit 3c8c4c8

Browse files
author
Lihan Li
committed
Doc
1 parent 399af09 commit 3c8c4c8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.rst

+11-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ Here are examples of all the supported arguments. Any not present are either for
236236
'priority=INTERACTIVE' '&'
237237
'schema_update_options=ALLOW_FIELD_ADDITION,ALLOW_FIELD_RELAXATION' '&'
238238
'use_query_cache=true' '&'
239-
'write_disposition=WRITE_APPEND'
239+
'write_disposition=WRITE_APPEND' '&'
240+
'with_subject={email}'
240241
)
241242
242243
In cases where you wish to include the full credentials in the connection URI you can base64 the credentials JSON file and supply the encoded string to the ``credentials_base64`` parameter.
@@ -259,13 +260,21 @@ In cases where you wish to include the full credentials in the connection URI yo
259260
'priority=INTERACTIVE' '&'
260261
'schema_update_options=ALLOW_FIELD_ADDITION,ALLOW_FIELD_RELAXATION' '&'
261262
'use_query_cache=true' '&'
262-
'write_disposition=WRITE_APPEND'
263+
'write_disposition=WRITE_APPEND' '&'
264+
'with_subject={email}'
263265
)
264266
265267
To create the base64 encoded string you can use the command line tool ``base64``, or ``openssl base64``, or ``python -m base64``.
266268

267269
Alternatively, you can use an online generator like `www.base64encode.org <https://www.base64encode.org>_` to paste your credentials JSON file to be encoded.
268270

271+
with_subject impersonation
272+
^^^^^^^^^^^^^^^^^^^^^^^^^^
273+
274+
If the service account has `domain-wide delegation authority`_, you may pass in `with_subject={email}` to impersonate the user.
275+
276+
.. _domain-wide delegation authority: https://developers.google.com/identity/protocols/oauth2/service-account#delegatingauthority
277+
269278

270279
Supplying Your Own BigQuery Client
271280
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)