Question
Why does the Phone cleanse configured for Phone/Type and Extension not work when I use Aggregation for survivorship?
As you can see below, the phone numbers are duplicated.
Current L3 configuration
"matchFieldURIs": [
"configuration/entityTypes/Person/attributes/Phone/attributes/Number",
"configuration/entityTypes/Person/attributes/Phone/attributes/Type",
"configuration/entityTypes/Person/attributes/Phone/attributes/Extension"
],
{
"attribute": "configuration/entityTypes/Person/attributes/Phone",
"survivorshipStrategy": "Aggregation"
},
Answer
-
The L3 configuration is defined as:
"matchFieldURIs": [
"configuration/entityTypes/Person/attributes/Phone/attributes/Number",
"configuration/entityTypes/Person/attributes/Phone/attributes/Type",
"configuration/entityTypes/Person/attributes/Phone/attributes/Extension"
],
- None of them has the "configuration/entityTypes/Person/attributes/Phone/attributes/Extension" attribute required to consider these sub-attributes as similar and de-duplicate them.
- The 'Extension' sub-attribute should be moved away or to either matchFieldURIsExactOrAllNull or matchFieldURIsExactOrNull sections.
"matchFieldURIs": [
"configuration/entityTypes/Person/attributes/Phone/attributes/Number",
"configuration/entityTypes/Person/attributes/Phone/attributes/Type"
],
"matchFieldURIsExactOrAllNull": [
"configuration/entityTypes/Person/attributes/Phone/attributes/Extension"
],
- We do not want the cleanser attribute to be a separate entity.
- To handle the cleanser attribute, make the following change (as explained in the implementation 2 example in https://docs.reltio.com/en/model/cleanse-data/cleanse-and-standardize-data-overview/out-of-the-box-cleanse-functions/phone-cleanser
Example configuration change
{
"uri": "configuration/entityTypes/Person/cleanse/infos/PhoneCleanserFn",
"useInCleansing": true,
"sequence": [
{
"chain": [
{
"cleanseFunction": "PhoneCleanserFn",
"resultingValuesSourceTypeUri": "configuration/sources/ReltioCleanser",
"proceedOnSuccess": true,
"proceedOnFailure": true,
"mapping": {
"inputMapping": [
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/Number",
"mandatory": true,
"allValues": true,
"cleanseAttribute": "Number"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/CountryCode",
"mandatory": false,
"allValues": true,
"cleanseAttribute": "CountryCode"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/Type",
"mandatory": false,
"allValues": true,
"cleanseAttribute": "Type"
}
],
"outputMapping": [
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/Type",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "Type"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/Number",
"mandatory": true,
"allValues": false,
"cleanseAttribute": "Number"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/CountryCode",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "CountryCode"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/Extension",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "Extension"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/LineType",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "LineType"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/FormatMask",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "FormatMask"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/ValidationStatus",
"mandatory": true,
"allValues": false,
"cleanseAttribute": "ValidationStatus"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/AreaCode",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "AreaCode"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/GeoCountry",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "GeoCountry"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/GeoArea",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "GeoArea"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/DigitCount",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "DigitCount"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/LocalNumber",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "LocalNumber"
},
{
"attribute": "configuration/entityTypes/Person/attributes/Phone/attributes/FormattedNumber",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "FormattedNumber"
}
]
}
}
]
}
],
"nestedAttributeToCleanse": "configuration/entityTypes/Person/attributes/Phone"
}
- After this 'Remove Attribute Duplicates Task' should be run (https://docs.reltio.com/en/explore/get-going-with-apis-and-rocs-utilities/reltio-rest-apis/engage-apis/tasks-api/remove-attribute-duplicates-task).
- More information about nested attribute configuration: https://docs.reltio.com/en/explore/get-going-with-apis-and-rocs-utilities/reltio-rest-apis/engage-apis/configuration-api/attributes-configuration
Comments
Please sign in to leave a comment.