mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-13 20:18:24 +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)
|
||||
and connection.credentials.gcpConfig.projectId
|
||||
):
|
||||
return (
|
||||
f"{connection.scheme.value}://{connection.credentials.gcpConfig.projectId}"
|
||||
)
|
||||
if isinstance( # pylint: disable=no-else-return
|
||||
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}://"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user