fix(superset): get alternate platform value if sqlalchemy_uri param is missing (#8667)

This commit is contained in:
Akhil 2023-08-28 15:03:43 +05:30 committed by GitHub
parent cc94ffbf6c
commit ada40e6edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,6 +200,8 @@ class SupersetSource(StatefulIngestionSourceBase):
f"{self.config.connect_uri}/api/v1/database/{database_id}"
).json()
sqlalchemy_uri = database_response.get("result", {}).get("sqlalchemy_uri")
if sqlalchemy_uri is None:
return database_response.get("result", {}).get("backend", "external")
return sql_common.get_platform_from_sqlalchemy_uri(sqlalchemy_uri)
@lru_cache(maxsize=None)