mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-16 13:41:37 +00:00
fix: bigquery root= in connection (#21154)
This commit is contained in:
parent
7abbb73ae2
commit
199aec8d3c
@ -89,9 +89,14 @@ def get_connection_url(connection: BigQueryConnection) -> str:
|
|||||||
isinstance(connection.credentials.gcpConfig, GcpCredentialsPath)
|
isinstance(connection.credentials.gcpConfig, GcpCredentialsPath)
|
||||||
and connection.credentials.gcpConfig.projectId
|
and connection.credentials.gcpConfig.projectId
|
||||||
):
|
):
|
||||||
return (
|
if isinstance( # pylint: disable=no-else-return
|
||||||
f"{connection.scheme.value}://{connection.credentials.gcpConfig.projectId}"
|
connection.credentials.gcpConfig.projectId, SingleProjectId
|
||||||
)
|
):
|
||||||
|
return f"{connection.scheme.value}://{connection.credentials.gcpConfig.projectId.root}"
|
||||||
|
|
||||||
|
elif isinstance(connection.credentials.gcpConfig.projectId, MultipleProjectId):
|
||||||
|
for project_id in connection.credentials.gcpConfig.projectId.root:
|
||||||
|
return f"{connection.scheme.value}://{project_id}"
|
||||||
|
|
||||||
return f"{connection.scheme.value}://"
|
return f"{connection.scheme.value}://"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user