Search
K
Links

Structure of a generator assignment

In the Tonic API, a generator assignment is referred to as a replacement.
A group of replacements makes up the message body for the response to get generator configuration details, and a request to update generator configuration details.
For details and examples of replacements for each Tonic generator, see Generator API reference.

Replacement structure

At a very high level, the structure of a replacement object is:
Diagram showing the overall outline of the replacement structure
Each Replacement object contains:
  • The name of the replacement
  • The schema and table where the configured columns are located
  • Link objects for generator and sub-generator configurations
  • Columns to use for partitioning
  • Model configuration for the AI Synthesizer
Each link object contains the generator or sub-generator configuration for a single column. For fallBackLinks, the link object contains the generator configuration for the fallback generator.
{
"presetId": "string",
"generatorId": "string",
"schema": "string",
"table": "string",
"column": "string",
"dataType": "string",
"pathExpression": "string",
"subPresetId": "string",
"subGeneratorId": "string",
"metadata": {
"isConsistent": boolean,
"consistencyColumn": "string",
"isDifferentiallyPrivate": boolean
},
"encryptionProcessor": "x-on",
"customValueProcessor": "string",
"customSubGeneratorValueProcessor": "string"
}

Generator and preset identification

presetId identifies the generator preset to apply to the column. generatorId identifies the type of generator. generatorId must be the type of generator for presetId.
Generator presets require an Enterprise license. For Basic and Professional licenses, only generatorId is provided.
For the built-in preset for a generator, presetId and generatorId are the same. If the generator preset specified by presetId is not available - for example if the generator preset was deleted - then the baseline version of the generator specified by generatorId is applied.

Column identification

To identify the column, you provide the schema name, table name, and column name. The schema and table values in the link object must match the schema and table values for the replacement.
For MongoDB, you also provide the data type.
Note that even if there isn't a schema (for example, for the Databricks data connector), you must still provide an empty value for schema.

Subgenerators for composite generators

For composite generators other than Array Regex, Regex, or Conditional, pathExpression identifies the value within the column to mask.
subPresetId identifies the generator preset to apply to the matching value. subGeneratorId identifies the generator type.
Generator presets require an Enterprise license. For Basic and Professional licenses, only subGeneratorId is provided.
For the built-in preset for a generator, subGeneratorId and subPresetId are the same. If the generator preset specified by subPresetId is not available - for example if the generator preset was deleted - then the baseline version of the generator specified by subGeneratorId is applied.

Generator configuration

metadata contains the generator configuration. metadata contains fields from BaseMetadata, which provides the fields to configure consistency and differential privacy. metadata can also contain additional objects and fields from generator-specific metadata objects.
Note that even if a generator does not have any available configuration for metadata, you must at least provide an empty metadata object.

Tonic data encryption

If Tonic data encryption is enabled for the instance, then to indicate to use the configured data encryption, set encryptionProcessor to x-on.

Custom value processors

Finally, you can specify a custom value processor to apply to the generator (customValueProcessor) or the sub-generator (customSubGeneratorValueProcessor).

Partition column list

The Continuous and Event Timestamps generators allow partitioning. The partitions field contains a comma-separated list of columns to partition by.

AI Synthesizer model configuration

The NnModelConfig object is used for the AI Synthesizer. It provides the model configuration.
modelType indicates whether the model contains event data. If the model contains event data, modelType is RNN_VAE. If the model does not contain model data, modelType is VAE.
Several configuration fields apply to both types of models. Other fields are specific to one type of model.
For models that contain event data, the nnModelConfig structure is:
"nnModelConfig": {
"modelType": "enum",
"epochs": integer,
"batchSize": integer,
"earlyStopping": boolean,
"recLossFactor": integer,
"latentDim": integer,
"maxCategoricalDim": integer,
"rnnEncoderHiddenSize": integer,
"rnnDecoderHiddenSize": integer,
"rnnDecoderFullyConnectedSize": integer,
"uiSequenceLength": integer,
"maskLossFactor": integer,
"deltaLossFactor": integer
}
For models that do not contain event data, the nnModelConfig structure is:
"nnModelConfig": {
"modelType": "enum",
"epochs": integer,
"batchSize": integer,
"earlyStopping": boolean,
"recLossFactor": integer,
"latentDim": integer,
"maxCategoricalDim": integer,
"encoderLayerSizes": [ integer ],
"decoderLayerSizes": [ integer ]
}