Skip to content

Commit

Permalink
feat(ingest/superset): map awsathena platform name to athena (datahub…
Browse files Browse the repository at this point in the history
  • Loading branch information
LePuppy authored Mar 11, 2024
1 parent b6956f9 commit ae3443b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions metadata-ingestion/src/datahub/ingestion/source/superset.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,14 @@ def get_platform_from_database_id(self, 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 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):
Expand Down

0 comments on commit ae3443b

Please sign in to comment.