Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
llance committed Feb 26, 2025
1 parent 8068350 commit b1213cf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions metadata-ingestion/src/datahub/ingestion/source/superset.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,16 @@ def construct_chart_from_chart_data(self, chart_data: dict) -> ChartSnapshot:
chart_url = f"{self.config.display_uri}{chart_data.get('url', '')}"

datasource_id = chart_data.get("datasource_id")
dataset_response = self.get_dataset_info(datasource_id)
datasource_urn = self.get_datasource_urn_from_id(
dataset_response, self.platform
)
if not datasource_id:
logger.debug(
f'chart {chart_data["id"]} has no datasource_id, skipping fetching dataset info'
)
datasource_urn = None
else:
dataset_response = self.get_dataset_info(datasource_id)
datasource_urn = self.get_datasource_urn_from_id(
dataset_response, self.platform
)

params = json.loads(chart_data.get("params", "{}"))
metrics = [
Expand Down

0 comments on commit b1213cf

Please sign in to comment.