Skip to content

Commit 5439a13

Browse files
author
Lihan Li
committed
feat: Only apply with_subject to service account permissions, it is not supported by ADC
1 parent cb97c3e commit 5439a13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlalchemy_bigquery/_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_bigquery_client(
5858
else:
5959
credentials, default_project = google.auth.default(scopes=SCOPES)
6060

61-
if with_subject:
61+
if with_subject and isinstance(credentials, (service_account.Credentials,)):
6262
credentials = credentials.with_subject(with_subject)
6363

6464
if project_id is None:

0 commit comments

Comments
 (0)