Skip to content

Commit

Permalink
fix(ingest/metabase): use card_id in dashboard to chart lineage (#6583)
Browse files Browse the repository at this point in the history
Co-authored-by: 陈城 <[email protected]>
Co-authored-by: Harshal Sheth <[email protected]>
  • Loading branch information
3 people authored Dec 30, 2022
1 parent e9176d2 commit 4209d6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metadata-ingestion/src/datahub/ingestion/source/metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ def construct_dashboard_from_api_data(
chart_urns = []
cards_data = dashboard_details.get("ordered_cards", "{}")
for card_info in cards_data:
chart_urn = builder.make_chart_urn(self.platform, card_info.get("id", ""))
chart_urn = builder.make_chart_urn(
self.platform, card_info.get("card_id", "")
)
chart_urns.append(chart_urn)

dashboard_info_class = DashboardInfoClass(
Expand Down Expand Up @@ -343,9 +345,7 @@ def construct_card_from_api_data(self, card_data: dict) -> Optional[ChartSnapsho
lastModified=AuditStamp(time=modified_ts, actor=modified_actor),
)

chart_type = self._get_chart_type(
card_details.get("id", ""), card_details.get("display")
)
chart_type = self._get_chart_type(card_id, card_details.get("display"))
description = card_details.get("description") or ""
title = card_details.get("name") or ""
datasource_urn = self.get_datasource_urn(card_details)
Expand Down

0 comments on commit 4209d6f

Please sign in to comment.