MINOR: Implement column validation in lineage patch api (#20545)

This commit is contained in:
Mayur Singal 2025-04-07 21:24:46 +05:30 committed by ulixius9
parent 11be097d60
commit afd9ed03f2
2 changed files with 5 additions and 3 deletions

View File

@ -267,9 +267,9 @@ class OMetaLineageTest(TestCase):
columnsLineage=[
ColumnLineage(
fromColumns=[
f"{self.table1_entity.fullyQualifiedName.root}.name"
f"{self.table1_entity.fullyQualifiedName.root}.another"
],
toColumn=f"{self.table2_entity.fullyQualifiedName.root}.name",
toColumn=f"{self.table2_entity.fullyQualifiedName.root}.another",
)
],
),

View File

@ -790,7 +790,9 @@ public class LineageRepository {
pipeline.getType(), pipeline.getId(), Include.NON_DELETED);
updated.withPipeline(pipeline);
}
String detailsJson = JsonUtils.pojoToJson(updated);
// Validate Lineage Details
String detailsJson = validateLineageDetails(from, to, updated);
dao.relationshipDAO()
.insert(fromId, toId, fromEntity, toEntity, Relationship.UPSTREAM.ordinal(), detailsJson);
addLineageToSearch(from, to, updated);