mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-04 20:49:54 +00:00
Fix Bigquery ADC diff projectid (#7935)
This commit is contained in:
parent
c932b3bf92
commit
ad53c509ba
@ -358,14 +358,12 @@ def _(connection: BigQueryConnection):
|
|||||||
|
|
||||||
_, project_id = auth.default()
|
_, project_id = auth.default()
|
||||||
if isinstance(connection.credentials.gcsConfig, GCSValues):
|
if isinstance(connection.credentials.gcsConfig, GCSValues):
|
||||||
has_project_id = hasattr(connection.credentials.gcsConfig, "projectId")
|
|
||||||
|
|
||||||
if not project_id:
|
if not project_id:
|
||||||
if has_project_id:
|
return f"{connection.scheme.value}://{connection.credentials.gcsConfig.projectId or ''}"
|
||||||
project_id = connection.credentials.gcsConfig.projectId
|
|
||||||
else:
|
else:
|
||||||
if has_project_id and not hasattr(
|
if (
|
||||||
connection.credentials.gcsConfig, "privateKey"
|
not connection.credentials.gcsConfig.privateKey
|
||||||
|
and connection.credentials.gcsConfig.projectId
|
||||||
):
|
):
|
||||||
# Setting environment variable based on project id given by user / set in ADC
|
# Setting environment variable based on project id given by user / set in ADC
|
||||||
project_id = connection.credentials.gcsConfig.projectId
|
project_id = connection.credentials.gcsConfig.projectId
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user