Configuring cleanse function mapping
You can configure input and output mapping for cleanse functions.
The mapping section of cleanseConfig contains information about the common input and output mappings for the cleanse functions. These mappings can be used inside the cleanse infos.
Configuring Input Mapping
Input mapping determines the attributes that are collected from an entity of the cleanse function.
| Attribute | Description |
|---|---|
attribute | Specifies the URI of an attribute in the entity. |
cleanseAttribute | Specifies the name of the attribute's value inside CleanseInputs (the key of the Map<String, Object>)
Where the key is the Type or ID and the value is an appropriate value. |
allValues | Specifies whether a single (OV) value or all values of the attributes are passed to the cleanse function.
|
mandatory | Specifies whether the value is required for the cleanse function.
|
cleanseLookupInputStrategy |
Specifies the value passed to the cleanse function for an attribute whose value is resolved through RDM lookup data. The following values are supported:
Consider the following behavior:
|
{
"URI": "configuration/entityTypes/HCP",
"cleanseConfig": {
"mappings": [
{
"URI": "configuration/entityTypes/HCP/cleanseConfig/mappings/Identifiers",
"inputMapping": [
{
"attribute": "configuration/entityTypes/HCP/attributes/Identifiers/attributes/Type",
"cleanseAttribute": "Identifiers.Type",
"mandatory": true,
"allValues": true,
"cleanseLookupInputStrategy": "LOOKUP_VALUE"
},
{
"attribute": "configuration/entityTypes/HCP/attributes/Identifiers/attributes/ID",
"cleanseAttribute": "Identifiers.ID",
"mandatory": false,
"allValues": true
}
]
}
],
...
}
}Maximum Attributes Combinations
[
{
"cleanseFunction": "Loqate",
"options": {
...
},
...
"maxAttributesCombinations": 100
}
]
Configuring Output Mapping
Output mapping determines where the cleansed values must be stored. It has the same structure as input mapping, except that the allValues parameter does not effect the output mapping.
CleanseOutputs structure generated by the cleanse function has the getCleansedAttributes method that returns Map<String, List<String>>.
- The
cleanseAttributeis the key for theMap<String, List<String>>. - The list of values
List<String>is applied to the attribute inside the entity.