Custom Categorical (CustomCategoricalGenerator)
The Custom Categorical generator is a version of the Categorical generator that selects from values that you provide instead of shuffling the original values.
The Custom Categorical generator supports linking. It can be made self-consistent, but not consistent with another column. You cannot configure differential privacy.
The
metadata
object is populated from the CustomCategoricalMetadata
object. You use the customCategories field to provide a list of the values to use for the column in the destination database. The values are provided on a single line, separated with newline characters (\n
). For example, "Small\nMedium\nLarge"
.{
"presetId": "string",
"generatorId": "CustomCategoricalGenerator",
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string" //MongoDB only
"metadata": {
"customCategories": "value\nvalue"
"isConsistent": boolean
},
"encryptionProcessor": "x-on", //To use configured Tonic data encryption
"customValueProcessor": "string" //If custom value processor applied
}
In this example replacement for the Custom Categorical generator, the values to use are Red, Yellow, Blue, and White. The generator is not linked.
Consistency is disabled.
{
"name": "color",
"schema": "public",
"table": "products",
"links": [
{
"presetID": "CustomCategoricalGenerator",
"generatorId": "CustomCategoricalGenerator",
"schema": "public",
"table": "products",
"column": "color",
"metadata": {
"customCategories": "Red\nYellow\nBlue\nWhite",
"isConsistent": false
}
]
}
Last modified 2mo ago