Pattern Based Cleanser
The pattern based cleanser generates the output text as defined and adds an attribute
to the ReltioCleanser
crosswalk.
Cleanser Name - PatternBasedFieldBuilder
Description - This cleanser generates the output text as defined and adds an
attribute to the ReltioCleanser
crosswalk, as per the output
mapping.
Key | Allowed | Sub-Attribute Name |
---|---|---|
isForce |
Boolean (true/false) |
|
pattern |
This is the only pattern to generate the desired output. | The output is generated as per the given pattern only. If no pattern is defined, the input values are arranged with spaces in between. |
Limitation - When you have defined a cleanse input name of your own, for the
desired output attribute, instead of OutputText
, the cleansing option
isForce
is not applicable.
L3 Configuration - Map the PatternBasedFieldBuilder
for any
entity in your L3 configuration. Here is an example of a sample configuration:
{
"uri": "configuration/entityTypes/HCP2",
"cleanseConfig": {
"infos": [
{
"uri": "configuration/entityTypes/HCP2/cleanse/infos/PatternBasedFieldBuilder",
"useInCleansing": true,
"sequence": [
{
"chain": [
{
"cleanseFunction": "PatternBasedFieldBuilder",
"resultingValuesSourceTypeUri": "configuration/sources/ReltioCleanser",
"proceedOnSuccess": true,
"proceedOnFailure": true,
"mapping": {
"inputMapping": [
{
"attribute": "configuration/entityTypes/HCP2/attributes/Name",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "Name"
},
{
"attribute": "configuration/entityTypes/HCP2/attributes/Organization",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "Organization"
},
{
"attribute": "configuration/entityTypes/HCP2/attributes/Country",
"mandatory": false,
"allValues": false,
"cleanseAttribute": "Country"
}
],
"outputMapping": [
{
"attribute": "configuration/entityTypes/HCP2/attributes/ShortNote",
"mandatory": true,
"allValues": false,
"cleanseAttribute": "OutputText"
}
]
},
"params": {
"isForce": true,
"pattern": "{Name}, {Organization} - {Country}"
}
}
]
}
]
}
]
},
"attributes": [
{
"uri": "configuration/entityTypes/HCP2/attributes/Name",
"label": "Name",
"name": "Name",
"description": "",
"type": "String",
"hidden": false,
"important": false
},
{
"uri": "configuration/entityTypes/HCP2/attributes/Country",
"label": "Country",
"name": "Country",
"description": "",
"type": "String",
"hidden": false,
"important": false
},
{
"uri": "configuration/entityTypes/HCP2/attributes/Organization",
"label": "Organization",
"name": "Description",
"description": "",
"type": "String",
"hidden": false,
"important": false
},
{
"uri": "configuration/entityTypes/HCP2/attributes/ShortNote",
"label": "ShortNote",
"name": "ShortNote",
"description": "",
"type": "String",
"hidden": false,
"important": false
}
]
}
Example
Options | Inputs (InputText) | Output (OutputText) |
---|---|---|
|
|
|
|
|
|