HStore Mask (HStoreMaskGenerator)
The HStore Mask generator runs selected generators on specified key values in an HStore column in a PostgreSQL database. HStore columns contain a set of key-value pairs.
For the HStore 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 HStore 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": "HStoreMaskGenerator",
"schema": "string",
"table": "string",
"column": "string",
"pathExpression": "string",
"subGeneratorId": "string",
"metadata": {
"subPresetId": "string",
"subGeneratorId": "string",
"subGeneratorMetadata": {
//Metadata for the selected generator
}
},
"customValueProcessor": "string", //If custom value processor assigned
"customSubGeneratorValueProcessor": "string" //If custom value processor assigned to the sub-generator
}
In the following example replacement for the HStore Mask generator:
- The Random Integer generator is assigned to the value of the
pages
path expression. The generator uses values between 300 and 500. - The Character Scramble generator is assigned to the value of the
title
path expression. Consistency is disabled.
{
"name": "hstore_col",
"schema": "public",
"table": "books",
"links": [
{
"generatorId": "HStoreMaskGenerator",
"presetId": "HStoreMaskGenerator",
"schema": "public",
"table": "books",
"column": "book_details",
"pathExpression": "pages",
"subPresetId": "RandomIntegerGenerator",
"subGeneratorId": "RandomIntegerGenerator",
"metadata": {
"subGeneratorId": "RandomIntegerGenerator",
"subGeneratorMetadata": {
"min": 300,
"max": 500
}
}
},
{
"generatorId": "HStoreMaskGenerator",
"presetId": "HStoreMaskGenerator",
"column": "book_details",
"table": "books",
"schema": "public",
"pathExpression": "title",
"subPresetId": "TextMaskGenerator",
"subGeneratorId": "TextMaskGenerator",
"metadata": {
"subGeneratorId": "TextMaskGenerator",
"subGeneratorMetadata": {
"isConsistent": false
}
}
}
]
}
Last modified 1mo ago