@@ -948,33 +948,28 @@ def to_datahub_work_units(
948
948
# Convert tiles to charts
949
949
ds_mcps , chart_mcps = self .to_datahub_chart (dashboard .tiles , workspace )
950
950
951
- # collect all downstream reports
952
- downstream_dashboards_edges = []
951
+ # collect all downstream reports (dashboards)
952
+ dashboard_edges = []
953
953
for t in dashboard .tiles :
954
- if t .report_id :
955
- report = workspace .reports .get (t .report_id )
956
- if report is None :
957
- # a title referencing a missed report was already reported during "fill_dashboards"
958
- continue
959
-
954
+ if t .report :
960
955
dashboard_urn = builder .make_dashboard_urn (
961
956
platform = self .__config .platform_name ,
962
957
platform_instance = self .__config .platform_instance ,
963
- name = report .get_urn_part (),
958
+ name = t . report .get_urn_part (),
964
959
)
965
960
edge = EdgeClass (
966
961
destinationUrn = dashboard_urn ,
967
- sourceUrn = None ,
968
- created = None ,
969
- lastModified = None ,
970
- properties = None ,
971
962
)
972
- downstream_dashboards_edges .append (edge )
963
+ dashboard_edges .append (edge )
973
964
974
965
# Lets convert dashboard to datahub dashboard
975
966
dashboard_mcps : List [MetadataChangeProposalWrapper ] = (
976
967
self .to_datahub_dashboard_mcp (
977
- dashboard , workspace , chart_mcps , user_mcps , downstream_dashboards_edges
968
+ dashboard = dashboard ,
969
+ workspace = workspace ,
970
+ chart_mcps = chart_mcps ,
971
+ user_mcps = user_mcps ,
972
+ dashboard_edges = dashboard_edges ,
978
973
)
979
974
)
980
975
@@ -1198,10 +1193,10 @@ def report_to_datahub_work_units(
1198
1193
1199
1194
# Let's convert report to datahub dashboard
1200
1195
report_mcps = self .report_to_dashboard (
1201
- workspace ,
1202
- report ,
1203
- chart_mcps ,
1204
- user_mcps ,
1196
+ workspace = workspace ,
1197
+ report = report ,
1198
+ chart_mcps = chart_mcps ,
1199
+ user_mcps = user_mcps ,
1205
1200
)
1206
1201
1207
1202
# Now add MCPs in sequence
0 commit comments