XML Mask (XmlMaskGenerator)
The XML Mask generator runs a selected generator on values that match a user specified path expression.
For the XML Mask generator, there is a link object for each path expression value to assign a generator to.
pathExpression
contains the expression, and subGeneratorId
identifies the generator to assign to the value for that path expression.The XML Mask generator does not itself support consistency or differential privacy.
- The sub-generator type to apply to the value from
pathExpression
. - The
subGeneratorMetadata
object, which contains the generator configuration for the selected sub-generator.
{
"generatorId": "XmlMaskGenerator",
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string", //MongoDB only
"subPresetId": "string",
"subGeneratorId": "string",
"pathExpression": "string",
"metadata": {
"subPresetId": "string",
"subGeneratorId": "string",
"subGeneratorMetadata": {
//Metadata for the selected generator
}
}
"customValueProcessor": "string", //If custom value processor applied
"customSubGeneratorValueProcessor": "string" //If custom value processor applied to the sub-generator
}
In the following example replacement for the XML Mask generator:
- The Name generator is assigned to the path expression
//view/item-descriptor//@display-name
. The value is in the format First Name Last Name (John Smith), and capitalization is not preserved. Consistency is disabled. - The Constant generator is assigned to the path expression
//view//object-class
. The constant value isobject-class
.
{
"name": "xml_data",
"schema": "public",
"table": "xml_me",
"links": [
{
"generatorId": "XmlMaskGenerator",
"presetId": "XmlMaskGenerator",
"schema": "public",
"table": "xml_me",
"column": "xml_data",
"subPresetId": "NameGenerator",
"subGeneratorId": "NameGenerator",
"pathExpression": "//view/item-descriptor//@display-name",
"metadata": {
"subPresetId": "NameGenerator",
"subGeneratorId": "NameGenerator",
"subGeneratorMetadata": {
"nameType": "FirstThenLastName",
"preserveCapitalization": false,
"isConsistent": false
}
}
},
{
"generatorId": "XmlMaskGenerator",
"presetId": "XmlMaskGenerator",
"schema": "public",
"table": "xml_me",
"column": "xml_data",
"subPresetId": "ConstantGenerator",
"subGeneratorId": "ConstantGenerator",
"pathExpression": "//view//object-class",
"metadata": {
"subPresetId": "ConstantGenerator",
"subGeneratorId": "ConstantGenerator",
"subGeneratorMetadata": {
"constant": "object-class"
}
}
}
]
}
Last modified 1mo ago