Links

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 or 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". To include NULL as an available value, use {NULL}.
{
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string" //MongoDB only
"metadata": {
"presetId": "string",
"generatorId": "CustomCategoricalGenerator",
"customCategories": "value\nvalue",
"isConsistent": boolean,
"consistencyColumn": "string",
"encryptionProcessor": "x-on", //To use configured Tonic data encryption
"customValueProcessor": "string" //If custom value processor applied
}
}

Example replacement

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": [
{
"schema": "public",
"table": "products",
"column": "color",
"metadata": {
"presetID": "CustomCategoricalGenerator",
"generatorId": "CustomCategoricalGenerator",
"customCategories": "Red\nYellow\nBlue\nWhite",
"isConsistent": false
}
]
}
Last modified 1mo ago