Partial override for reference attributes
Learn about the partial override request to change reference attributes.
In a partial override request, to change a reference attribute, you specify only the values and corresponding sub-values of the reference attribute in the Entities. The API modifies only the specified attributes while keeping the remaining attributes intact.
- To enable the partial override for reference attributes, contact Reltio Support.
- By default, the connectRelationsToDefaultCrosswalk flag is enabled.
- Partial override of reference attributes involves the usage of a new approach of creating DCRs.
The enabled partial override for reference attributes, in combination with the partialOverride
option in a request, changes the current default behavior.
The partial override does the following actions, instead of removing the existing reference values that are not specified in the request:
- Appends the new reference attribute, if a relation specified in a request does not match* with any of the existing relations.
- Updates the reference attribute, if a relation specified in the request matches* with an existing relation
- Deletes the reference attribute, if a null value is sent for the matched relation.
*For more information, see Selecting a value to Change section.
Partial override of reference attributes is executed by slices. For example, let us assume that there is an entity with an Address
referring to a location with two crosswalks fb.1 and fb.2. In the partial override request, if only fb.1 is specified in the refEntity, then attributes related to fb.1 are overridden. The attributes of fb.2 crosswalk are not changed.
Partial override follows the Immutable Reference Attributes logic.
When the Partial Override for Reference Attributes is enabled and a crosswalk is provided for the referenced entity, then at least one of them must be the data provider.
Selecting the Value to Change
A reference attribute is a collection of a referenced entity and a relationship. In a partial override request for an existing entity, both the values of refEntity
and refRelation
are considered, to select the value of the existing reference attribute in order to modify it.
The search is carried out by the value of refRelation
, start
and end
objects. These values are defined by the main entity and the value of refEntity
respectively. Thus, for the correct partial override of the reference attribute, it is necessary that both refEntity
and refRelation
are correctly specified.
The following example, Request for a Partial Override illustrates for a partial override of reference attribute including the descriptions of each element.
Request for a Partial Override
URI
, the entity is created with the default crosswalk. If the created entity has a match by a match rule with an existing one, the entities are merged.The similar rule is applied to relations. If refRelation
is not filled in a reference attribute of the request or not found in the database by the specified URI, the relation will be created with the default source type and an automatically generated value. If refRelation
contains a non-existent crosswalk, a relation will be created with this crosswalk. Then, if there is a match for the relation by the same start/end objects in the database the created relation will be merged with the found one.
Actions on the found Attributes
Depending on the values of refEntity
and refRelation
, the result of partial override are as follows:
- The relation is found neither by
refRelation
nor bystart
/end
objects:- If the entity from
refEntity
does not exist, the referenced entity and the relation are created. The reference attribute is added to the main entity. - If the entity from
refEntity
exists, the referenced entity is partially overridden. The relation is created, the reference attribute is added to the main entity.
- If the entity from
- The relation is not found by the specified identifier (crosswalk/
URI
), but is available by thestart
/end
objects:- If the type of relation, found by the crosswalk/
URI
from the database, is different from the type in the request, the error is returned. In that case, no changes in the database are made. - If the type of relations are the same, the referenced entity is partially overridden and the relation is updated. Also, the reference attribute is updated.
- If the type of relation, found by the crosswalk/
- The relation is found by the specified identifier (crosswalk/
URI
) and not found by thestart
/end
objects:- The error is returned, no changes in the database are made.
- The relation is found by the specified identifier (crosswalk/
URI
) andstart
/end
objects:- If the types of relation found by the crosswalk/
URI
in the database, and in the request are different - the error is returned, no changes in the database are made. - If the types of relation, found by the crosswalk/
URI
in the database, and in the request are the same, but the start objects are different - the error is returned, no changes in the database are made. - If the types and the start objects of relations are the same, but the end objects are different, the error is returned, no changes in the database are made.
- If the relation obtained by the crosswalk/
URI
is the same as found by thestart
/end
object, the referenced entity and the relation is partially overridden. Also, the reference attribute is updated.
- If the types of relation found by the crosswalk/
Actions on the found Attributes table illustrates the information mentioned above:
# | Conditions | Result | Example | ||||||||||
referenced entity | relation in DB, found by CW/URI from the request | relation type in DB (found by CW/URI of relation in the request) and in the request | start object in DB (found by CW/URI of relation in the request) and in the request | end object in DB (found by CW/URI of relation in the request) and in the request | relation in DB, found by start/end obj from the request | referenced entity | relation | reference attribute | Another result | DB (ref entity) | DB (relations) | Request (relations) | |
1 | doesn't exist | doesn't exist | - | - | - | - | create | create | add | - | - | A to E, rel005 | A to B, rel001 |
2 | exists | different | - | - | - | - | - | - | Error - Repoint is prohibited | - | A to E, rel001, type2 | A to B, rel001, type1 | |
3 | exists | the same | different | - | - | - | - | - | Error - Repoint is prohibited | - | D to E, rel001, type1 | A to B, rel001, type1 | |
4 | exists | the same | the same | different | - | - | - | - | Error - Repoint is prohibited | - | A to E, rel001, type1 | A to B, rel001, type1 | |
5 | exists | doesn't exist | - | - | - | doesn't exist | update (PO) | create | add | - | B | - | A to B, rel001 |
6 | doesn't exist | - | - | - | exists | update (PO) | update | update | - | B | A to B, rel005 | A to B, rel001 | |
7 | exists | different | - | - | doesn't exist | - | - | - | Error - Repoint is prohibited | B | D to B, rel001, type2 | A to B, rel001, type1 | |
8 | exists | different | - | - | exists | - | - | - | Error - Repoint is prohibited | B | A to B, rel001, type2 | A to B, rel001, type1 | |
9 | exists | the same | different | - | doesn't exist | - | - | - | Error - Repoint is prohibited | B | D to B, rel001, type1 | A to B, rel001, type1 | |
10 | exists | the same | different | - | exists | - | - | - | Error - Repoint is prohibited | B | D to B, rel001, type1 A to B, rel002, type1 | A to B, rel001, type1 | |
11 | exists | the same | the same | different | doesn't exist | - | - | - | Relation is repointed and partially overridden | B | A to E, rel001, type1 | A to B, rel001, type1 | |
12 | exists | the same | the same | different | exists | - | - | - | Relation is repointed and partially overridden | B | A to E, rel001, type1 A to B, rel002, type1 | A to B, rel001, type1 | |
13 | exists | the same | the same | the same | exists | update (PO) | update (PO) | update | - | B | A to B, rel001, type1 | A to B, rel001, type1 |
Create a Request
The following information displays the requirements for the referenced entity (refEntity
) and referenced Relation (refRelation
), which must meet in order to perform the necessary actions.
- Add a new entity as a reference attribute:
refEntity
: It must contain a crosswalk for a new referenced entity.-
refRelation
: It must contain a crosswalk for a new relation. There must be no relations in the database that match the specified one by acrosswalk
,start
/end
objects, and a relation type. - Result: The referenced entity and the relation are created. The new reference attribute value is added to the main entity.
- Add an existing entity as a reference attribute:
refEntity
: It must contain a crosswalk or a URI of the existing entity.refRelation
: It must contain a crosswalk for a new relation. There must be no relations in the database that match the specified one by a crosswalk,start
/end
objects and a relation type.Result
: The existing referenced entity is overridden. The relation is created and the new reference attribute value is added to the main entity.
- Update the values of a reference attribute with a new crosswalk:
refEntity
: It must contain a crosswalk orURI
of the existing entity.Note: You must add an appropriate value ofrefEntity
. The system selects the value of the reference attribute that will be updated based on the values ofrefEntity
and the main entity.refRelation
: It must contain a new crosswalk for the relation.Result
: The referenced entity is partially overridden, the attributes of relation are added to the relation with the specified crosswalk.
- Update (or delete) the values of a reference attribute with the same crosswalk:
refEntity
: It must contain a crosswalk or URI of the existing entity.refRelation
: It must contain a crosswalk orURI
of the relation that must be updated.Result
: The referenced entity and the relation are partially overridden with the values specified in the request. The reference attribute is updated.
- Repoint a value of the reference attribute to a new entity:
refEntity
: It must contain a crosswalk for a new referenced entity.refRelation
: It must contain a crosswalk orURI
of the relation that must be updated.Result
: The referenced entity is created and the attributes of the relation are partially overridden with the values specified in the request. The reference attribute is updated.
- Repoint a value of the reference attribute to an existing entity:
refEntity
: It must contain a crosswalk or URI of the existing entity so that the relation can be updated.refRelation
: It must contain a crosswalk orURI
of the relation that must be updated.Result
: The referenced entity is partially overridden and the attributes of the relation are partially overridden with the values specified in the request. The reference attribute is updated.
Surrogate Crosswalks
You can set a refEntity
with a surrogate crosswalk. In this scenario, you can do the following operations on a reference attribute:
- ADD: A new value of the reference attribute is added, if the specified relation is not found in the database.
- If a referenced entity is not found by a generated crosswalk - the entity is created and used as the end object of the relation.
- If a referenced entity is found by a generated crosswalk, this entity is used as the end object.
- UPDATE: A reference attribute is updated, if both the specified relation and the referenced entity with a generated crosswalk are found in the database. This indicates that only the attributes of the relation and/or the attributes of the referenced entity, that are not used in the surrogate crosswalk calculation, are updated in the request.
Null Values
Null values are used to remove a value of a reference attribute or its sub-attributes. The value to be deleted is searched for using the refRelation
, start (main entity
) and end (refEntity
) objects. If there is an existing relation between the matches for the incoming main entity
and refEntity
objects, then the Reltio Platform removes all specified crosswalks within the refRelation
object inside the incoming JSON request. If all crosswalks for the relation are removed, the relation is also removed. If all crosswalks are not removed, the relation will still be available, but will not have the crosswalks that were specified in the incoming refRelation
object.
In the refRelation
object, when a URI is specified in the incoming JSON request instead of a crosswalk, the Reltio Platform will work in a similar manner to when there is a crosswalk in the JSON file of a default source system with a value that is equal to the ID of the URI. It is recommended that you use crosswalks instead of URIs.
Example
- The initial entity is created with two values of the
Address
reference attribute:Initial Entity
[ { "type": "configuration/entityTypes/HCP", "attributes": { "FirstName": [ { "value": "FirstName001" } ], "Address": [ { "value": { "AddressType": [ { "value": "Home" } ], "AddressRank": [ { "value": "0011" }, { "value": "0012" } ], "AddressLine1": [ { "value": "AddressA" } ], "City": [ { "value": "CityA" } ], "Street": [ { "value": "StreetA" } ] }, "refEntity": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "loc_A" } ] }, "refRelation": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "rel_001" } ] } }, { "value": { "AddressType": [ { "value": "Home" } ], "AddressRank": [ { "value": "002" } ], "AddressLine1": [ { "value": "AddressB" } ], "City": [ { "value": "CityB" } ] }, "refEntity": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "loc_B" } ] }, "refRelation": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "rel_002" } ] } } ] }, "crosswalks": [ { "type": "configuration/sources/FB", "value": "hcp_001" } ] } ]
Response
{ "uri": "entities/1Nq9BCo", "type": "configuration/entityTypes/HCP", "createdBy": "reltioUser", "createdTime": 1621021283128, "updatedBy": "reltioUser", "updatedTime": 1621021283128, "attributes": { "FirstName": [ { "type": "configuration/entityTypes/HCP/attributes/FirstName", "ov": true, "value": "FirstName001", "uri": "entities/1Nq9BCo/attributes/FirstName/6nOgurJG" } ], "Address": [ { "label": "AddressB CityB", "relationshipLabel": "rank - 002", "value": { "AddressType": [ { "type": "configuration/relationTypes/HasAddress/attributes/AddressType", "ov": true, "value": "Home", "lookupError": "Lookup isn't found", "uri": "entities/1Nq9BCo/attributes/Address/0zbTNd8/AddressType/6nOgvtF8" } ], "AddressRank": [ { "type": "configuration/relationTypes/HasAddress/attributes/AddressRank", "ov": true, "value": "002", "uri": "entities/1Nq9BCo/attributes/Address/0zbTNd8/AddressRank/6nOgvxVO" } ], "AddressLine1": [ { "type": "configuration/entityTypes/Location/attributes/AddressLine1", "ov": true, "value": "AddressB", "uri": "entities/1Nq9BCo/attributes/Address/0zbTNd8/AddressLine1/6nOgw1le" } ], "City": [ { "type": "configuration/entityTypes/Location/attributes/City", "ov": true, "value": "CityB", "uri": "entities/1Nq9BCo/attributes/Address/0zbTNd8/City/6nOgw61u" } ] }, "ov": true, "uri": "entities/1Nq9BCo/attributes/Address/0zbTNd8", "refEntity": { "type": "configuration/entityTypes/Location", "crosswalks": [ { "uri": "entities/1Nq9BCo/crosswalks/1Nq9JjK.6nOgwAIA", "type": "configuration/sources/FB", "value": "loc_B", "createDate": "2021-05-14T19:41:23.128Z", "updateDate": "2021-05-14T19:41:23.128Z", "attributeURIs": [ "entities/1Nq9BCo/attributes/Address/0zbTNd8", "entities/1Nq9BCo/attributes/Address/0zbTNd8/AddressLine1/6nOgw1le", "entities/1Nq9BCo/attributes/Address/0zbTNd8/City/6nOgw61u" ] } ], "objectURI": "entities/1Nq9JjK" }, "refRelation": { "type": "configuration/relationTypes/HasAddress", "crosswalks": [ { "uri": "entities/1Nq9BCo/crosswalks/0zbTNd8.6nOgwEYQ", "type": "configuration/sources/FB", "value": "rel_002", "createDate": "2021-05-14T19:41:23.128Z", "updateDate": "2021-05-14T19:41:23.128Z", "attributeURIs": [ "entities/1Nq9BCo/attributes/Address/0zbTNd8", "entities/1Nq9BCo/attributes/Address/0zbTNd8/AddressRank/6nOgvxVO", "entities/1Nq9BCo/attributes/Address/0zbTNd8/AddressType/6nOgvtF8" ] } ], "startRefPinned": false, "endRefPinned": false, "startRefIgnored": false, "endRefIgnored": false, "objectURI": "relations/0zbTNd8" }, "startObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "hcp_001" } ], "endObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "loc_B" } ] }, { "label": "AddressA CityA", "relationshipLabel": "rank - 0012, 0011", "value": { "AddressType": [ { "type": "configuration/relationTypes/HasAddress/attributes/AddressType", "ov": true, "value": "Home", "lookupError": "Lookup isn't found", "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressType/6nOgv8MI" } ], "AddressRank": [ { "type": "configuration/relationTypes/HasAddress/attributes/AddressRank", "ov": true, "value": "0012", "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressRank/6nOgvGso" }, { "type": "configuration/relationTypes/HasAddress/attributes/AddressRank", "ov": true, "value": "0011", "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressRank/6nOgvCcY" } ], "AddressLine1": [ { "type": "configuration/entityTypes/Location/attributes/AddressLine1", "ov": true, "value": "AddressA", "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressLine1/6nOgvL94" } ], "City": [ { "type": "configuration/entityTypes/Location/attributes/City", "ov": true, "value": "CityA", "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/City/6nOgvPPK" } ], "Street": [ { "type": "configuration/entityTypes/Location/attributes/Street", "ov": true, "value": "StreetA", "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/Street/6nOgvTfa" } ] }, "ov": true, "uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs", "refEntity": { "type": "configuration/entityTypes/Location", "crosswalks": [ { "uri": "entities/1Nq9BCo/crosswalks/1Nq9FT4.6nOgvXvq", "type": "configuration/sources/FB", "value": "loc_A", "createDate": "2021-05-14T19:41:23.128Z", "updateDate": "2021-05-14T19:41:23.128Z", "attributeURIs": [ "entities/1Nq9BCo/attributes/Address/0zbTJMs", "entities/1Nq9BCo/attributes/Address/0zbTJMs/Street/6nOgvTfa", "entities/1Nq9BCo/attributes/Address/0zbTJMs/City/6nOgvPPK", "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressLine1/6nOgvL94" ] } ], "objectURI": "entities/1Nq9FT4" }, "refRelation": { "type": "configuration/relationTypes/HasAddress", "crosswalks": [ { "uri": "entities/1Nq9BCo/crosswalks/0zbTJMs.6nOgvcC6", "type": "configuration/sources/FB", "value": "rel_001", "createDate": "2021-05-14T19:41:23.128Z", "updateDate": "2021-05-14T19:41:23.128Z", "attributeURIs": [ "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressRank/6nOgvGso", "entities/1Nq9BCo/attributes/Address/0zbTJMs", "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressType/6nOgv8MI", "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressRank/6nOgvCcY" ] } ], "startRefPinned": false, "endRefPinned": false, "startRefIgnored": false, "endRefIgnored": false, "objectURI": "relations/0zbTJMs" }, "startObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "hcp_001" } ], "endObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "loc_A" } ] } ] }, "isFavorite": false, "crosswalks": [ { "uri": "entities/1Nq9BCo/crosswalks/6nOgwIog", "type": "configuration/sources/FB", "value": "hcp_001", "reltioLoadDate": "2021-05-14T19:41:23.128Z", "createDate": "2021-05-14T19:41:23.128Z", "updateDate": "2021-05-14T19:41:23.128Z", "attributes": [ "entities/1Nq9BCo/attributes/FirstName/6nOgurJG" ], "singleAttributeUpdateDates": {} } ], "analyticsAttributes": {}, "label": "FirstName001", "secondaryLabel": "AddressB CityB" }
- Do a partial override of the initial entity:
- In the first value, remove the values for AddressRank (an attribute of the relation) and Street (an attribute of the referenced entity).
- Remove the second value completely.
- Similarly, send a request for a partial override with null values:
Request for a partial override with null values
[
{
"type": "configuration/entityTypes/HCP",
"attributes": {
"Address": [
{
"value": {
"AddressRank": [
{
"value": null
}
],
"Street": [
{
"value": null
}
]
},
"refEntity": {
"crosswalks": [
{
"type": "configuration/sources/FB",
"value": "loc_A"
}
]
},
"refRelation": {
"crosswalks": [
{
"type": "configuration/sources/FB",
"value": "rel_001"
}
]
}
},
{
"value": null,
"refEntity": {
"crosswalks": [
{
"type": "configuration/sources/FB",
"value": "loc_B"
}
]
},
"refRelation": {
"crosswalks": [
{
"type": "configuration/sources/FB",
"value": "rel_002"
}
]
}
}
]
},
"crosswalks": [
{
"type": "configuration/sources/FB",
"value": "hcp_001"
}
]
}
]
{
"uri": "entities/1Nq9BCo",
"type": "configuration/entityTypes/HCP",
"createdBy": "reltioUser",
"createdTime": 1621021283128,
"updatedBy": "reltioUser",
"updatedTime": 1621021416115,
"attributes": {
"FirstName": [
{
"type": "configuration/entityTypes/HCP/attributes/FirstName",
"ov": true,
"value": "FirstName001",
"uri": "entities/1Nq9BCo/attributes/FirstName/6nOgurJG"
}
],
"Address": [
{
"label": "AddressA CityA",
"relationshipLabel": "rank -",
"value": {
"AddressType": [
{
"type": "configuration/relationTypes/HasAddress/attributes/AddressType",
"ov": true,
"value": "Home",
"lookupError": "Lookup isn't found",
"uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressType/6nOgv8MI"
}
],
"AddressLine1": [
{
"type": "configuration/entityTypes/Location/attributes/AddressLine1",
"ov": true,
"value": "AddressA",
"uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressLine1/6nOgvL94"
}
],
"City": [
{
"type": "configuration/entityTypes/Location/attributes/City",
"ov": true,
"value": "CityA",
"uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs/City/6nOgvPPK"
}
]
},
"ov": true,
"uri": "entities/1Nq9BCo/attributes/Address/0zbTJMs",
"refEntity": {
"type": "configuration/entityTypes/Location",
"crosswalks": [
{
"uri": "entities/1Nq9BCo/crosswalks/1Nq9FT4.6nOgvXvq",
"type": "configuration/sources/FB",
"value": "loc_A",
"createDate": "2021-05-14T19:41:23.128Z",
"updateDate": "2021-05-14T19:41:23.128Z",
"attributeURIs": [
"entities/1Nq9BCo/attributes/Address/0zbTJMs",
"entities/1Nq9BCo/attributes/Address/0zbTJMs/City/6nOgvPPK",
"entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressLine1/6nOgvL94"
]
}
],
"objectURI": "entities/1Nq9FT4"
},
"refRelation": {
"type": "configuration/relationTypes/HasAddress",
"crosswalks": [
{
"uri": "entities/1Nq9BCo/crosswalks/0zbTJMs.6nOgvcC6",
"type": "configuration/sources/FB",
"value": "rel_001",
"createDate": "2021-05-14T19:41:23.128Z",
"updateDate": "2021-05-14T19:41:23.128Z",
"attributeURIs": [
"entities/1Nq9BCo/attributes/Address/0zbTJMs",
"entities/1Nq9BCo/attributes/Address/0zbTJMs/AddressType/6nOgv8MI"
]
}
],
"startRefPinned": false,
"endRefPinned": false,
"startRefIgnored": false,
"endRefIgnored": false,
"objectURI": "relations/0zbTJMs"
},
"startObjectCrosswalks": [
{
"type": "configuration/sources/FB",
"value": "hcp_001"
}
],
"endObjectCrosswalks": [
{
"type": "configuration/sources/FB",
"value": "loc_A"
}
]
}
]
},
"isFavorite": false,
"crosswalks": [
{
"uri": "entities/1Nq9BCo/crosswalks/6nOgwIog",
"type": "configuration/sources/FB",
"value": "hcp_001",
"reltioLoadDate": "2021-05-14T19:41:23.128Z",
"createDate": "2021-05-14T19:41:23.128Z",
"updateDate": "2021-05-14T19:41:23.128Z",
"attributes": [
"entities/1Nq9BCo/attributes/FirstName/6nOgurJG"
],
"singleAttributeUpdateDates": {}
}
],
"analyticsAttributes": {},
"label": "FirstName001",
"secondaryLabel": "AddressA CityA"
}
The result is that values of the attributes of the referenced entity (Street) and relation (AddressRank) are removed. The values of the reference attributes, found by refRelation,
and the start
and end
objects are removed.
Nested Sub-attributes Inside a Reference Attribute
Partial override of nested sub-attributes inside a Reference attribute is applicable, only if Partial Override for Nested Attributes is enabled.
In this case a value of a nested attribute that must be updated depends on the values of keyAttributeURIs
and matchFieldURIs
. The kyeAttributeURIs
and matchFieldURIs
are specified in the business configuration for the tenant.
For more information, see Attributes Configuration.
Nested References
Partial override works only with reference attributes of level 1. To add or modify a nested reference attribute, partial override must be applied to the corresponding entity, which is the start object for the respective relation.
For example, there is a chain of reference attributes:
Health Care Professional (HCP) contains a link to Healthcare Organizations (HCO) in Affiliated reference attribute that is connected with a location by Address reference attribute. Partial override can be applied only to theAffiliated reference attribute, if HCP is specified in the request as a main entity. Otherwise, partial override can be applied to Address
, if there is a request of partial override for HCO entity.
Data Change Request
You can use the data change request to delay the application of partial override results.
For more information, see Extended Logic for Partial Override in Data Change Requests.
Changes in DCR table displays the actions on the reference attribute along with changes in DCR.
Action | Changes in DCR |
---|---|
Add a new reference attribute | CREATE_ENTITY , CREATE_RELATIONSHIP |
Add a new attribute of a referenced entity | INSERT_ATTRIBUTE |
Add a new attribute of a relation | INSERT_ATTRIBUTE |
Add a null value | no change |
Change (including pin/ignore) an attribute of a referenced entity | DELETE_ATTRIBUTE , INSERT_ATTRIBUTE |
Change (including pin/ignore) an attribute of a relation | DELETE_ATTRIBUTE , INSERT_ATTRIBUTE |
Delete a reference attribute | DELETE_RELATIONSHIP |
Delete an attribute of a referenced entity | DELETE_ATTRIBUTE |
Delete an attribute of a relation | DELETE_ATTRIBUTE |
Error Codes in Partial Override
The following Error Codes in Partial Override table explains error codes and respective messages.
Error code | Error message | Detailed message | Description | Recommended Action |
---|---|---|---|---|
134 | Relation with the same crosswalk(s) but different start or end objects already exist. | Relation with the same crosswalk(s) but different start/end objects already exists. Crosswalks: [{0} ]. Existing relation (id=[{1}] , startEntity=[{2}] , endEntity=[{3}] ), new relation is trying to be created between startEntity=[{4}] and endEntity=[{5}] . | Occurs if a relation, found in the database by the specified crosswalk, has different start or end objects or a type | Publish the relation using a crosswalk that has a different Crosswalk ID or Crosswalk type. |
904 | Relation with provided URI already exists with another type | URI ''{0} " is provided in the request body for the Ref Relation of a ''{1} '' type. But Relation with this URI already exists and has ''{2} '' type | Occurs if a new relation, found in the database by the specified URI, already exists and has a different crosswalk type | Avoid assigning a URI to a crosswalk. Reltio platform automatically assigns a unique URI to each crosswalk. |
905 | URI ''{0} '' is provided in the request body for the Ref Relation of a ''{1} '' type. But Relation with this URI already exists and has ''{2} '' type | URI ''{0} '' is provided in the request body for the Ref Relation, where the main incoming entity matches to the existing entity ''{1} '', which is specified as '' {2} '' object. But relation with this URI already exists with another {2} object: ''{3} '' | Occurs if a relation, found in the database by the specified URI, already exists with another object | |
906 | Relation with provided URI already exists with another start and end objects | URI ''{0}' ' is provided in the request body for the Ref Relation. Relation with this URI already exists between ''{1}'' and ''{2}'' . But at the same time there is another existing Relation ''{3}'' that connects matches for incoming start and end entities: ''{4}'' and ''{5}' | Occurs if a new relation, found in the database by the specified URI, already exists and has different start or end objects | |
907 | Reference attribute has all crosswalks with dataProvider=false | Reference attribute has all crosswalks with dataProvider=false | The error is displayed when all the crosswalks specified inside the referenced entity have the dataProvider flag set to false . | Set at least one crosswalk in the referenced entity as a data provider. |
Examples
Operations over reference sub-attributes
Requirement: Update one of two existing addresses in HCP. Add one sub-attribute, change and delete the others.
- Create an HCP with addresses:
POST {{api_uri}}/{{tenant}}/entities
[ { "attributes": { "FirstName": [ { "value": "FirstNameA" } ], "Address": [ { "value": { "AddressType": [ { "value": "home" } ], "AddressLine1": [ { "value": "Some Ave" } ], "City": [ { "value": "Some city" } ], "Street": [ { "value": "Some street" } ] }, "refEntity": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "loc1" } ] }, "refRelation": { "crosswalks": [ { "type": "configuration/sources/HMS", "value": "rel1" } ] } }, { "value": { "AddressRank": [ { "value": "2" } ], "AddressLine1": [ { "value": "Another Ave" } ] }, "refEntity": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "loc2" } ] }, "refRelation": { "crosswalks": [ { "type": "configuration/sources/HMS", "value": "rel2" } ] } } ] }, "type": "configuration/entityTypes/HCP", "crosswalks": [ { "type": "configuration/sources/FB", "value": "hcp" } ] } ]
The following entity with two addresses appears in the database:
Created HCP
[ { "index": 0, "object": { "uri": "entities/1O1RyLW", "type": "configuration/entityTypes/HCP", "createdBy": "reltioUser", "createdTime": 1621024508316, "updatedBy": "reltioUser", "updatedTime": 1621024508316, "attributes": { "FirstName": [ { "type": "configuration/entityTypes/HCP/attributes/FirstName", "ov": true, "value": "FirstNameA", "uri": "entities/1O1RyLW/attributes/FirstName/6oq9eDfi" } ], "Address": [ { "label": "Some Ave Some city", "relationshipLabel": "rank -", "value": { "AddressType": [ { "type": "configuration/relationTypes/HasAddress/attributes/AddressType", "ov": true, "value": "home", "lookupError": "Lookup isn't found", "uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressType/6oq9eUik" } ], "AddressLine1": [ { "type": "configuration/entityTypes/Location/attributes/AddressLine1", "ov": true, "value": "Some Ave", "uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressLine1/6oq9eYz0" } ], "City": [ { "type": "configuration/entityTypes/Location/attributes/City", "ov": true, "value": "Some city", "uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/City/6oq9edFG" } ], "Street": [ { "type": "configuration/entityTypes/Location/attributes/Street", "ov": true, "value": "Some street", "uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/Street/6oq9ehVW" } ] }, "ov": true, "uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ", "refEntity": { "type": "configuration/entityTypes/Location", "crosswalks": [ { "uri": "entities/1O1RyLW/crosswalks/1O1S2bm.6oq9ellm", "type": "configuration/sources/FB", "value": "loc1", "attributeURIs": [ "entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressLine1/6oq9eYz0", "entities/1O1RyLW/attributes/Address/0zmeKsQ/City/6oq9edFG", "entities/1O1RyLW/attributes/Address/0zmeKsQ/Street/6oq9ehVW", "entities/1O1RyLW/attributes/Address/0zmeKsQ" ] } ], "objectURI": "entities/1O1S2bm" }, "refRelation": { "type": "configuration/relationTypes/HasAddress", "crosswalks": [ { "uri": "entities/1O1RyLW/crosswalks/0zmeKsQ.6oq9eq22", "type": "configuration/sources/HMS", "value": "rel1", "attributeURIs": [ "entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressType/6oq9eUik", "entities/1O1RyLW/attributes/Address/0zmeKsQ" ] } ], "startRefPinned": false, "endRefPinned": false, "startRefIgnored": false, "endRefIgnored": false, "objectURI": "relations/0zmeKsQ" }, "startObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "hcp" } ], "endObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "loc1" } ] }, { "label": "Another Ave", "relationshipLabel": "rank - 2", "value": { "AddressRank": [ { "type": "configuration/relationTypes/HasAddress/attributes/AddressRank", "ov": true, "value": "2", "uri": "entities/1O1RyLW/attributes/Address/0zmeP8g/AddressRank/6oq9f754" } ], "AddressLine1": [ { "type": "configuration/entityTypes/Location/attributes/AddressLine1", "ov": true, "value": "Another Ave", "uri": "entities/1O1RyLW/attributes/Address/0zmeP8g/AddressLine1/6oq9fBLK" } ] }, "ov": true, "uri": "entities/1O1RyLW/attributes/Address/0zmeP8g", "refEntity": { "type": "configuration/entityTypes/Location", "crosswalks": [ { "uri": "entities/1O1RyLW/crosswalks/1O1S6s2.6oq9fFba", "type": "configuration/sources/FB", "value": "loc2", "attributeURIs": [ "entities/1O1RyLW/attributes/Address/0zmeP8g", "entities/1O1RyLW/attributes/Address/0zmeP8g/AddressLine1/6oq9fBLK" ] } ], "objectURI": "entities/1O1S6s2" }, "refRelation": { "type": "configuration/relationTypes/HasAddress", "crosswalks": [ { "uri": "entities/1O1RyLW/crosswalks/0zmeP8g.6oq9fJrq", "type": "configuration/sources/HMS", "value": "rel2", "attributeURIs": [ "entities/1O1RyLW/attributes/Address/0zmeP8g", "entities/1O1RyLW/attributes/Address/0zmeP8g/AddressRank/6oq9f754" ] } ], "startRefPinned": false, "endRefPinned": false, "startRefIgnored": false, "endRefIgnored": false, "objectURI": "relations/0zmeP8g" }, "startObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "hcp" } ], "endObjectCrosswalks": [ { "type": "configuration/sources/FB", "value": "loc2" } ] } ] }, "isFavorite": false, "crosswalks": [ { "uri": "entities/1O1RyLW/crosswalks/6oq9fO86", "type": "configuration/sources/FB", "value": "hcp", "reltioLoadDate": "2021-05-14T20:35:08.316Z", "createDate": "2021-05-14T20:35:08.316Z", "updateDate": "2021-05-14T20:35:08.316Z", "attributes": [ "entities/1O1RyLW/attributes/FirstName/6oq9eDfi" ], "singleAttributeUpdateDates": {} } ], "analyticsAttributes": {}, "label": "FirstNameA", "secondaryLabel": "Some Ave Some city" }, "successful": true } ]
- Perform the necessary changes: Add a new sub-attribute
City
, changeAddressLine1
and deleteAddressType
from the address.POST{{api_uri}}/{{tenant}}/entities?options=partialOverride
[ { "attributes": { "Address": [ { "value": { "AddressLine1": [ { "value": "Completely different Ave" } ], "AddressType": { "value": null }, "Street": { "value": "New value" } }, "refEntity": { "crosswalks": [ { "type": "configuration/sources/FB", "value": "loc2" } ] }, "refRelation": { "crosswalks": [ { "type": "configuration/sources/HMS", "value": "rel2" } ] } } ] }, "type": "configuration/entityTypes/HCP", "crosswalks": [ { "type": "configuration/sources/FB", "value": "hcp" } ] } ]
Result
The entity changed with the partial override request
{
"uri": "entities/1O1RyLW",
"type": "configuration/entityTypes/HCP",
"createdBy": "reltioUser",
"createdTime": 1621024508316,
"updatedBy": "reltioUser",
"updatedTime": 1621024580689,
"attributes": {
"FirstName": [
{
"type": "configuration/entityTypes/HCP/attributes/FirstName",
"ov": true,
"value": "FirstNameA",
"uri": "entities/1O1RyLW/attributes/FirstName/6oq9eDfi"
}
],
"Address": [
{
"label": "Some Ave Some city",
"relationshipLabel": "rank -",
"value": {
"AddressType": [
{
"type": "configuration/relationTypes/HasAddress/attributes/AddressType",
"ov": true,
"value": "home",
"lookupError": "Lookup isn't found",
"uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressType/6oq9eUik"
}
],
"AddressLine1": [
{
"type": "configuration/entityTypes/Location/attributes/AddressLine1",
"ov": true,
"value": "Some Ave",
"uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressLine1/6oq9eYz0"
}
],
"City": [
{
"type": "configuration/entityTypes/Location/attributes/City",
"ov": true,
"value": "Some city",
"uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/City/6oq9edFG"
}
],
"Street": [
{
"type": "configuration/entityTypes/Location/attributes/Street",
"ov": true,
"value": "Some street",
"uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ/Street/6oq9ehVW"
}
]
},
"ov": true,
"uri": "entities/1O1RyLW/attributes/Address/0zmeKsQ",
"refEntity": {
"type": "configuration/entityTypes/Location",
"crosswalks": [
{
"uri": "entities/1O1RyLW/crosswalks/1O1S2bm.6oq9ellm",
"type": "configuration/sources/FB",
"value": "loc1",
"createDate": "2021-05-14T20:35:08.316Z",
"updateDate": "2021-05-14T20:35:08.316Z",
"attributeURIs": [
"entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressLine1/6oq9eYz0",
"entities/1O1RyLW/attributes/Address/0zmeKsQ/City/6oq9edFG",
"entities/1O1RyLW/attributes/Address/0zmeKsQ/Street/6oq9ehVW",
"entities/1O1RyLW/attributes/Address/0zmeKsQ"
]
}
],
"objectURI": "entities/1O1S2bm"
},
"refRelation": {
"type": "configuration/relationTypes/HasAddress",
"crosswalks": [
{
"uri": "entities/1O1RyLW/crosswalks/0zmeKsQ.6oq9eq22",
"type": "configuration/sources/HMS",
"value": "rel1",
"createDate": "2021-05-14T20:35:08.316Z",
"updateDate": "2021-05-14T20:35:08.316Z",
"attributeURIs": [
"entities/1O1RyLW/attributes/Address/0zmeKsQ/AddressType/6oq9eUik",
"entities/1O1RyLW/attributes/Address/0zmeKsQ"
]
}
],
"startRefPinned": false,
"endRefPinned": false,
"startRefIgnored": false,
"endRefIgnored": false,
"objectURI": "relations/0zmeKsQ"
},
"startObjectCrosswalks": [
{
"type": "configuration/sources/FB",
"value": "hcp"
}
],
"endObjectCrosswalks": [
{
"type": "configuration/sources/FB",
"value": "loc1"
}
]
},
{
"label": "Completely different Ave",
"relationshipLabel": "rank - 2",
"value": {
"AddressRank": [
{
"type": "configuration/relationTypes/HasAddress/attributes/AddressRank",
"ov": true,
"value": "2",
"uri": "entities/1O1RyLW/attributes/Address/0zmeP8g/AddressRank/6oq9f754"
}
],
"AddressLine1": [
{
"type": "configuration/entityTypes/Location/attributes/AddressLine1",
"ov": true,
"value": "Completely different Ave",
"uri": "entities/1O1RyLW/attributes/Address/0zmeP8g/AddressLine1/6oqAKhjC"
}
],
"Street": [
{
"type": "configuration/entityTypes/Location/attributes/Street",
"ov": true,
"value": "New value",
"uri": "entities/1O1RyLW/attributes/Address/0zmeP8g/Street/6oqAKlzS"
}
]
},
"ov": true,
"uri": "entities/1O1RyLW/attributes/Address/0zmeP8g",
"refEntity": {
"type": "configuration/entityTypes/Location",
"crosswalks": [
{
"uri": "entities/1O1RyLW/crosswalks/1O1S6s2.6oq9fFba",
"type": "configuration/sources/FB",
"value": "loc2",
"createDate": "2021-05-14T20:35:08.316Z",
"updateDate": "2021-05-14T20:35:08.316Z",
"attributeURIs": [
"entities/1O1RyLW/attributes/Address/0zmeP8g/AddressLine1/6oqAKhjC",
"entities/1O1RyLW/attributes/Address/0zmeP8g",
"entities/1O1RyLW/attributes/Address/0zmeP8g/Street/6oqAKlzS"
]
}
],
"objectURI": "entities/1O1S6s2"
},
"refRelation": {
"type": "configuration/relationTypes/HasAddress",
"crosswalks": [
{
"uri": "entities/1O1RyLW/crosswalks/0zmeP8g.6oq9fJrq",
"type": "configuration/sources/HMS",
"value": "rel2",
"createDate": "2021-05-14T20:35:08.316Z",
"updateDate": "2021-05-14T20:35:08.316Z",
"attributeURIs": [
"entities/1O1RyLW/attributes/Address/0zmeP8g",
"entities/1O1RyLW/attributes/Address/0zmeP8g/AddressRank/6oq9f754"
]
}
],
"startRefPinned": false,
"endRefPinned": false,
"startRefIgnored": false,
"endRefIgnored": false,
"objectURI": "relations/0zmeP8g"
},
"startObjectCrosswalks": [
{
"type": "configuration/sources/FB",
"value": "hcp"
}
],
"endObjectCrosswalks": [
{
"type": "configuration/sources/FB",
"value": "loc2"
}
]
}
]
},
"isFavorite": false,
"crosswalks": [
{
"uri": "entities/1O1RyLW/crosswalks/6oq9fO86",
"type": "configuration/sources/FB",
"value": "hcp",
"reltioLoadDate": "2021-05-14T20:35:08.316Z",
"createDate": "2021-05-14T20:35:08.316Z",
"updateDate": "2021-05-14T20:35:08.316Z",
"attributes": [
"entities/1O1RyLW/attributes/FirstName/6oq9eDfi"
],
"singleAttributeUpdateDates": {}
}
],
"analyticsAttributes": {},
"label": "FirstNameA",
"secondaryLabel": "Some Ave Some city"
}