Skip to content

Commit

Permalink
fix(superset): get alternate platform value if sqlalchemy_uri param i…
Browse files Browse the repository at this point in the history
…s missing (#8667)
  • Loading branch information
akhil7philip authored Aug 28, 2023
1 parent cc94ffb commit ada40e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metadata-ingestion/src/datahub/ingestion/source/superset.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ def get_platform_from_database_id(self, database_id):
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)
Expand Down

0 comments on commit ada40e6

Please sign in to comment.