diff --git a/dqops/src/main/java/com/dqops/metadata/lineage/lineageservices/TableLineageServiceImpl.java b/dqops/src/main/java/com/dqops/metadata/lineage/lineageservices/TableLineageServiceImpl.java index aca09279ff..9b9552808d 100644 --- a/dqops/src/main/java/com/dqops/metadata/lineage/lineageservices/TableLineageServiceImpl.java +++ b/dqops/src/main/java/com/dqops/metadata/lineage/lineageservices/TableLineageServiceImpl.java @@ -140,6 +140,11 @@ public TableCurrentDataQualityStatusModel collectUpstreamLineage( Set upstreamSourceTables = tableLineageEntry.getUpstreamSourceTables(); for (DomainConnectionTableKey upstreamTableKey : upstreamSourceTables) { TableCurrentDataQualityStatusModel upstreamOnlyQualityStatus = this.tableStatusCache.getCurrentTableStatus(upstreamTableKey, null); + if (upstreamOnlyQualityStatus == null) { + upstreamOnlyQualityStatus = new TableCurrentDataQualityStatusModel() {{ + setTableExist(false); + }}; + } if (visitedTables.contains(upstreamTableKey)) { if (!onStackTables.contains(upstreamTableKey)) { diff --git a/dqops/src/main/java/com/dqops/rest/controllers/DataLineageController.java b/dqops/src/main/java/com/dqops/rest/controllers/DataLineageController.java index c8d1d2d87f..b9197b6bac 100644 --- a/dqops/src/main/java/com/dqops/rest/controllers/DataLineageController.java +++ b/dqops/src/main/java/com/dqops/rest/controllers/DataLineageController.java @@ -221,7 +221,7 @@ public Mono>> getTableSourceTab listModel.setSourceTableDataQualityStatus(notFoundTableStatus); return; } - TableWrapper sourceTableWrapper = connectionWrapper.getTables().getByObjectName( + TableWrapper sourceTableWrapper = sourceConnectionWrapper.getTables().getByObjectName( new PhysicalTableName(listModel.getSourceSchema(), listModel.getSourceTable()), true); if (sourceTableWrapper == null) { listModel.setSourceTableDataQualityStatus(notFoundTableStatus);