feat(ingest/superset): map awsathena platform name to athena (#10005)

This commit is contained in:
LePuppy 2024-03-11 15:23:42 +01:00 committed by GitHub
parent b6956f9a5c
commit ae3443bcb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,8 +226,14 @@ class SupersetSource(StatefulIngestionSourceBase):
).json()
sqlalchemy_uri = database_response.get("result", {}).get("sqlalchemy_uri")
if sqlalchemy_uri is None:
return database_response.get("result", {}).get("backend", "external")
return get_platform_from_sqlalchemy_uri(sqlalchemy_uri)
platform_name = database_response.get("result", {}).get(
"backend", "external"
)
else:
platform_name = get_platform_from_sqlalchemy_uri(sqlalchemy_uri)
if platform_name == "awsathena":
return "athena"
return platform_name
@lru_cache(maxsize=None)
def get_datasource_urn_from_id(self, datasource_id):