Question
Is there anyway to use a reference attribute in a match rule? I am getting the following error message.
"severity": "Error",
"errorMessage": "Only simple type attributes are allowed in match rules",
"errorCode": 375,
"errorDetailMessage": "Match rule 'configuration/entityTypes/Individual/matchGroups/Rule1' attribute 'configuration/entityTypes/Individual/attributes/Country' should not have type other than simple.",
"innerErrorData": {
"exception": "com.reltio.metadata.model.exceptions.AttributeTypeIsNotSimpleException:Code: ATTRIBUTE_TYPE_IS_NOT_SIMPLE; Message parameters: null. Only simple type attributes are allowed in match rules. Match rule 'configuration/entityTypes/Individual/matchGroups/Rule1' attribute 'configuration/entityTypes/Individual/attributes/Country' should not have type other than simple. at com.reltio.metadata.model.match.ValidatingMatchRuleModelVisitor.checkAttribute, line 410"
}
Match rule
"matchGroups": [
{
"uri": "configuration/entityTypes/Individual/matchGroups/Rule1",
"label": "Suspect-Exact On FullName,Source",
"type": "suspect",
"scope": "INTERNAL",
"useOvOnly": "true",
"rule": {
"matchTokenClasses": {
"mapping": [
{
"attribute": "configuration/entityTypes/Individual/attributes/Name",
"class": "com.reltio.match.token.ExactMatchToken"
},
{
"attribute": "configuration/entityTypes/Individual/attributes/Country",
"class": "com.reltio.match.token.ExactMatchToken"
}
]
},
"comparatorClasses": {
"mapping": [
{
"attribute": "configuration/entityTypes/Individual/attributes/Name",
"class": "com.reltio.match.comparator.BasicStringComparator"
},
{
"attribute": "configuration/entityTypes/Individual/attributes/Source",
"class": "com.reltio.match.comparator.BasicStringComparator"
},
{
"attribute": "configuration/entityTypes/Individual/attributes/Country",<<<===
"class": "com.reltio.match.comparator.BasicStringComparator"
}
]
},
"and": {
"exact": [
"configuration/entityTypes/Individual/attributes/Name",
"configuration/entityTypes/Individual/attributes/Source",
"configuration/entityTypes/Individual/attributes/Country" <<<===
]
}
},
"scoreStandalone": 0,
"scoreIncremental": 0
}
Answer
Look at the configuration being used
Example:
This is the current configuration:{
"label": "Country",
"name": "Country",
"type": "Reference",
"hidden": false,
"important": false,
"system": false,
"relationshipLabelPattern": "{Name} {OrganizationType}",
"attributeOrdering": {
"fieldURI": "configuration/entityTypes/Organization/attributes/Name",
"orderType": "ASC",
"orderingStrategy": "LUD"
},
"uri": "configuration/entityTypes/Individual/attributes/Country",
"referencedAttributeURIs": [
"configuration/entityTypes/Organization/attributes/Name" <<====
],
"referencedEntityTypeURI": "configuration/entityTypes/Organization",
"relationshipTypeURI": "configuration/relationTypes/OrganizationIndividual",
"skipInDataAccess": false
},
The correct usage of the attribute would be like 'exact(configuration/entityTypes/Individual/attributes/Country/attributes/Name)'.
The Country itself cannot be used, it is composite attribute. Its nested leaf attributes listed in 'referencedAttributeURIs' can be used as if they belong to 'Individual' configuration/entityTypes/Organization is replaced by configuration/entityTypes/Individual/attributes/Country in the original attribute
Comments
Please sign in to leave a comment.