Problem
How to associate a new crosswalk with an existing contributor?
Solution
In case of override of an already existing entity, it is possible to associate new crosswalks with the already existing contributor.
To associate a new crosswalk with a proper contributor need to add to the entity's JSON at least one crosswalk from the contributor, with which the new crosswalk should be associated, with "dataProvider": false and "contributorProvider: true" properties. In this case, a newly created crosswalk will be associated with the contributor, which contains a non-"dataProvider" crosswalk marked as contributor provider.
Example
There is an entity with the following crosswalk tree (see Get Entity Crosswalk Tree):
{ "merges": [ { "time": 1413408570877, "user": "user", "mergeReason": "Merge by hand", "mergeRules": "", "losers": [ { "crosswalks": [ { "URI": "entities/fb.1/crosswalks/9ju9", "type": "configuration/sources/FB", "ownerType": "entity", "value": "fb.1" } ], "URI": "entities/fb.1" } ] } ], "crosswalks": [ { "URI": "entities/lnkd.1/crosswalks/BZ3K", "type": "configuration/sources/LNKD", "ownerType": "entity", "value": "lnkd.1" } ], "URI": "entities/lnkd.1" }
It has two contributors ("fb.1" and "lnkd.1") and each contributor contains one crosswalk.
Let's assume that we are going to add some values with the new crosswalk: "fb.2". And we want to associate this new crosswalk with "fb.1" contributor. In this case, we need to execute the following request:
POST {TenantURL}/entities Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512, Content-Type: application/json Body: [ { "type": "configuration/entityTypes/Individual", "attributes": { "Name": [ { "value": "New name" } ], ... }, "crosswalks": [ { "type": "configuration/sources/FB", "value": "fb.1", "dataProvider": false, "contributorProvider": true }, { "type": "configuration/sources/FB", "value": "fb.2", "dataProvider": true } ] } ]
Note: there is non-"dataProvider" crosswalk "fb.1" with "contributorProvider": true property.
Now the crosswalk tree will looks as follows:
{ "merges": [ { "time": 1413408570877, "user": "user", "mergeReason": "Merge by hand", "mergeRules": "", "losers": [ { "crosswalks": [ { "URI": "entities/fb.1/crosswalks/9ju9", "type": "configuration/sources/FB", "ownerType": "entity", "value": "fb.1" }, { "URI": "entities/fb.1/crosswalks/hk3f", "type": "configuration/sources/FB", "ownerType": "entity", "value": "fb.2" } ], "URI": "entities/fb.1" } ] } ], "crosswalks": [ { "URI": "entities/lnkd.1/crosswalks/BZ3K", "type": "configuration/sources/LNKD", "ownerType": "entity", "value": "lnkd.1" } ], "URI": "entities/lnkd.1" }
If we had to post new entity without "contributorProvider" property for "fb.1" non-"dataProvider" crosswalk (default behaviour), we got the following crosswalk tree:
{ "merges": [ { "time": 1413408570877, "user": "user", "mergeReason": "Merge by hand", "mergeRules": "", "losers": [ { "crosswalks": [ { "URI": "entities/0YjDHlZ/crosswalks/9ju9", "type": "configuration/sources/FB", "ownerType": "entity", "value": "fb.1" } ], "URI": "entities/0BFcxNd" } ] }, { "time": 1413409970877, "user": "user", "mergeReason": "Merge by crosswalks", "mergeRules": "", "losers": [ { "crosswalks": [ { "URI": "entities/0YjDHlZ/crosswalks/hk3f", "type": "configuration/sources/FB", "ownerType": "entity", "value": "fb.2" } ], "URI": "entities/0G2cxkL", "phantomEntity": true } ] } ], "crosswalks": [ { "URI": "entities/0YjDHlZ/crosswalks/BZ3K", "type": "configuration/sources/LNKD", "ownerType": "entity", "value": "lnkd.1" } ], "URI": "entities/0YjDHlZ" }
References
https://docs.reltio.com/entitiesapi/associatecrosswalk.html
Comments
Article is closed for comments.