From c941569a9e8e695b24a3e9d6fd8d198ae30fe650 Mon Sep 17 00:00:00 2001 From: harshsoni2024 <64592571+harshsoni2024@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:05:58 +0530 Subject: [PATCH] filter empty columns, better msg (#18932) --- .../ingestion/source/dashboard/tableau/metadata.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/tableau/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/tableau/metadata.py index 39626bbfde1..42fe0f76be3 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/tableau/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/tableau/metadata.py @@ -383,9 +383,12 @@ class TableauSource(DashboardServiceSource): column=column.id, ) for to_column in to_columns: - column_lineage.append( - ColumnLineage(fromColumns=[from_column], toColumn=to_column) - ) + if from_column and to_column: + column_lineage.append( + ColumnLineage( + fromColumns=[from_column], toColumn=to_column + ) + ) return column_lineage except Exception as exc: logger.debug(f"Error to get column lineage: {exc}") @@ -452,6 +455,7 @@ class TableauSource(DashboardServiceSource): column.id for field in upstream_data_model.fields for column in field.upstreamColumns + if column is not None } for table in datamodel.upstreamTables or []: om_tables = self._get_database_tables(db_service_entity, table) @@ -889,6 +893,9 @@ class TableauSource(DashboardServiceSource): try: return dashboard_details.project.name except Exception as exc: + logger.info( + f"Cannot parse project name for dashboard:{dashboard_details.id} from Tableau server" + ) logger.debug(traceback.format_exc()) logger.warning( f"Error fetching project name for {dashboard_details.id}: {exc}"