Comment on page
Find and Replace (FindAndReplaceGenerator)
The Find and Replace generator replaces all instances of a specified find string with a specified replace string.
The Find and Replace generator does not support linking or consistency. You cannot configure differential privacy.
The
metadata
object is populated from the FindAndReplaceMetadata
object. The generator-specific configuration includes:- The find string
- Whether the find string is a regular expression
- The replace string
{
"presetId": "string",
"generatorId": "FindAndReplaceGenerator",
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string", //MongoDB only
"metadata": {
"find": "string",
"useRegex": boolean
"replace": "string",
},
"encryptionProcessor": "x-on", //To use configured Tonic data encryption
"customValueProcessor": "string" //If custom value processor applied
}
In this example replacement for the Find and Replace generator, the value
yes
is replaced by the value no
. The find string is not a regular expression.{
"name": "workclass",
"schema": "public",
"table": "training_classes",
"links": [
{
"presetId": "FindAndReplaceGenerator",
"generatorId": "FindAndReplaceGenerator",
"schema": "public",
"table": "training_classes",
"column": "workclass",
"metadata": {
"find": "yes",
"useRegex": false
"replace": "no",
}
}
]
}
Last modified 3mo ago