mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-18 21:42:27 +00:00
Minor: Fix Superset Dashboard Lineage Handling (#20207)
* Fix Superset Dashboard Lineage Handling - Safely handle chart SQL attribute using getattr - Update error message for dashboard lineage details to be more generic * refactor: formatting improvement in Superset dashboard lineage handling
This commit is contained in:
parent
a47d725975
commit
b9540b0c7d
@ -282,7 +282,7 @@ class SupersetSourceMixin(DashboardServiceSource):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def _get_input_tables(self, chart: FetchChart):
|
def _get_input_tables(self, chart: FetchChart):
|
||||||
if chart.sql:
|
if getattr(chart, "sql", None):
|
||||||
result = self._parse_lineage_from_dataset_sql(chart)
|
result = self._parse_lineage_from_dataset_sql(chart)
|
||||||
else:
|
else:
|
||||||
result = [
|
result = [
|
||||||
@ -339,7 +339,7 @@ class SupersetSourceMixin(DashboardServiceSource):
|
|||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
yield Either(
|
yield Either(
|
||||||
left=StackTraceError(
|
left=StackTraceError(
|
||||||
name=db_service_name,
|
name="Dashboard Lineage Details",
|
||||||
error=(
|
error=(
|
||||||
"Error to yield dashboard lineage details for DB "
|
"Error to yield dashboard lineage details for DB "
|
||||||
f"service name [{db_service_name}]: {exc}"
|
f"service name [{db_service_name}]: {exc}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user