Question
How to check the merge details of nested attributes?
Answer
Using the crosswalktree API, we can get the merged entities details, see below in details:
GET {TenantURL}/{entityURI}/_crosswalkTree
where: TenantURL: https://dev.reltio.com/reltio/api/<Tenant Id>
Get Entity Crosswalk Tree:
Returns tree of contributors that have been merged into the specified entity. The root of the tree is the entity itself. Each contributor node consists of the following fields:
URI - URI of the contributor
crosswalks - crosswalks of the contributor (including crosswalks of relations that represent reference attributes)
merges - an array of composite nodes each of that represents a case of merge into this contributor during its lifetime (whereas it keeps the winner of merges). Each merge node in its turn consists of such nodes:
time - timestamp when merge occurred
user - initiator of the merge case
losers - contributors(entities) that were participating in merge but became a links
mergeReason - information about what caused the merge
mergeRules - information about automatic match groups caused the merge (if the merge was by the groups)
phantomEntity - a boolean field that tells whether this contributor was a phantom (that means it was never persisted in the database as a separate entity, it was just a participant of "merge-on-the-fly")
Example-
Request
GET {TenantURL}/entities/031WTej/_crosswalkTree
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Response
{
"merges": [
{
"time": 1391096398251,
"user": "Mike",
"mergeReason": "Merge by hand",
"losers": [
{
"merges": [
{
"time": 1391096396326,
"user": "User",
"mergeReason": "Merge by hand",
"losers": [
{
"uri": "entities/0000Ust",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/599",
"type": "configuration/sources/SDS",
"ownerType": "entity",
"value": "FourthHCP",
"sourceTable": "Account"
},
{
"uri": "relations/0000JBB/crosswalks/359",
"type": "configuration/sources/SDS",
"ownerType": "relation",
"value": "FourthAddressRelation"
}
]
}
]
},
{
"time": 1391096397289,
"user": "User",
"mergeReason": "Merge by hand",
"losers": [
{
"merges": [
{
"time": 1391096387133,
"user": "Automatic merge process at 2014-09-19",
"mergeReason": "Merges found by background merge process",
"matchRules": "Person by passport and full name",
"losers": [
{
"uri": "entities/0000Dqr",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/611",
"type": "configuration/sources/SDS",
"ownerType": "entity",
"value": "SecondHCP",
"sourceTable": "Account"
},
{
"uri": "relations/0000Aef/crosswalks/130",
"type": "configuration/sources/SDS",
"ownerType": "relation",
"value": "SecondAddressRelation"
}
]
}
]
},
{
"time": 1391096387253,
"user": "Mike",
"mergeReason": "Merge on the fly",
"matchRules": "Person by passport and full name",
"losers": [
{
"uri": "entities/Second_Phantom_Contributor",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/604",
"type": "configuration/sources/amh54dX",
"ownerType": "entity",
"value": "Second MF Contributor XWalk Value"
}
],
"phantomEntity": true
}
]
}
],
"uri": "entities/00005KL",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/594",
"type": "configuration/sources/SDS",
"ownerType": "entity",
"value": "FirstHCP",
"sourceTable": "Account"
},
{
"uri": "relations/00006OP/crosswalks/15",
"type": "configuration/sources/SDS",
"ownerType": "relation",
"value": "FirstAddressRelation"
}
]
}
]
}
],
"uri": "entities/0000MNN",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/605",
"type": "configuration/sources/SDS",
"ownerType": "entity",
"value": "ThirdHCP",
"sourceTable": "Account"
},
{
"uri": "relations/0000Euv/crosswalks/245",
"type": "configuration/sources/SDS",
"ownerType": "relation",
"value": "ThirdAddressRelation"
}
]
}
]
},
{
"time": 1391096398594,
"user": "Mike",
"mergeReason": "Merge on the fly"
"losers": [
{
"uri": "entities/Third_Phantom_Contributor",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/32",
"type": "configuration/sources/amh54dX",
"ownerType": "entity",
"value": "Third MF Contributor Crosswalk Value"
}
],
"phantomEntity": true
}
]
},
{
"losers": [
{
"uri": "entities/First_Fake_Phantom_Contributor",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/610",
"type": "configuration/sources/amh54dX",
"ownerType": "entity",
"value": "2-12-85-06"
}
],
"phantomEntity": true
}
]
}
],
"uri": "entities/031WTej",
"crosswalks": [
{
"uri": "entities/0000dQR/crosswalks/471",
"type": "configuration/sources/SDS",
"ownerType": "entity",
"value": "FifthHCP",
"sourceTable": "Account"
},
{
"uri": "relations/0000NRR/crosswalks/473",
"type": "configuration/sources/SDS",
"ownerType": "relation",
"value": "FifthAddressRelation"
}
]
}
Comments
this answer refers about entity merge where as initial question was about Nested Attribute merge details
Please sign in to leave a comment.