mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-18 14:06:59 +00:00
MINOR: Implement column validation in lineage patch api (#20545)
This commit is contained in:
parent
3186937cc2
commit
4a407f6d0d
@ -267,9 +267,9 @@ class OMetaLineageTest(TestCase):
|
|||||||
columnsLineage=[
|
columnsLineage=[
|
||||||
ColumnLineage(
|
ColumnLineage(
|
||||||
fromColumns=[
|
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",
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1146,7 +1146,8 @@ public class LineageRepository {
|
|||||||
updated.setUpdatedAt(System.currentTimeMillis());
|
updated.setUpdatedAt(System.currentTimeMillis());
|
||||||
updated.setUpdatedBy(updatedBy);
|
updated.setUpdatedBy(updatedBy);
|
||||||
|
|
||||||
String detailsJson = JsonUtils.pojoToJson(updated);
|
// Validate Lineage Details
|
||||||
|
String detailsJson = validateLineageDetails(from, to, updated);
|
||||||
dao.relationshipDAO()
|
dao.relationshipDAO()
|
||||||
.insert(fromId, toId, fromEntity, toEntity, Relationship.UPSTREAM.ordinal(), detailsJson);
|
.insert(fromId, toId, fromEntity, toEntity, Relationship.UPSTREAM.ordinal(), detailsJson);
|
||||||
addLineageToSearch(from, to, updated);
|
addLineageToSearch(from, to, updated);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user