The defaultGenerator object specifies the generator to apply if none of the conditions are met. It includes a condition object with an empty list of conditions.
The conditionalGenerators object contains the generators to apply based on one or more conditions. For each entry in conditionalGenerators, you identify and configure the generator, and provide the conditions to meet in order to apply that generator. The conditions can be joined by AND or OR.
Each condition identifies the column for which to check the value, the type of check, the value to check, and the type of data in the column that is checked.
{"schema":"string","table":"string","column":"string","dataType":"string",//MongoDB only"metadata": {"generatorId":"ConditionalGenerator","presetId":"ConditionalGenerator","customValueProcessor":"string",//If custom value processor applied"defaultGenerator": {"metadata": {"presetId":"string","generatorId":"string",//Metadata for the selected generator },"condition": {"op":"AND","conditions": [] },"conditionalGenerators": [ {"metadata": {"presetId":"string","generatorId":"string","customValueProcessor":"string",//If custom value processor applied//Metadata for the selected generator },"condition": {"op":"enum","conditions": [ {"col":"string","op":"enum","val":"string","colDataType":"string" } ] } } ] }}
Example replacement
In the following example replacement for the Conditional generator, the default generator is the Address generator, which is configured with the zip code as the address type.
The column being configured is column1.
If column1 contains the value VALUE and column2 is not NULL, then the Random Integer generator is applied to column1. It applies a value between 0 and 10.
If column4 contains a value that matches the regular expression .*, then the Categorical generator is applied to column1. epsilon is 1, and differential privacy is disabled.