Composite generators

Most Tonic Structural generators consume source data and perform an operation on it to produce destination data. For example, the Character Scramble generator takes the original data from the source database, replaces the letters and numbers with random letters and numbers, and then writes the result to the destination database.

Composite generators do not generate data directly.

Structural provides the following composite generators:

How composite generators work

Most composite generators treat the input as structured data that the generator parses using a domain-specific syntax, such as:

  • XPath for XML or HTML

  • JSONPath for JSON or a Spark StructType

  • Regular expressions for text

These generators allow you to select a sub-value of the input, and then configure a specific generator to apply to only that sub-value. This means that you can take your original structured data and selectively mask the content.

For example, for the following structured content:

{ name: { first: "Tj", last: "Bass" } }

You indicate to use the Name generator to replace the value of last. The result is something like:

{ name: { first: "Tj", last: "Pine" } }

The Conditional generator is slightly different. It allows you to apply a specific generator when the column value matches a specific condition. For example, you can indicate to apply a Character Scramble generator only if the column value is something other than "test".

Composite generator limitations

You cannot configure generator presets for composite generators from the Generator Presets view. The Generator Presets view does not have access to data to use for path expressions or conditions. From a column configuration panel, you can save the current configuration as the new baseline configuration, and reset the configuration to the current baseline.

For any composite generator, when you select the generator to apply to a selected sub-value or based on a specified condition, you cannot select another composite generator. For example, you cannot apply a Conditional or XML Mask generator to the value of a specified path expression.

For composite generators other than the Conditional or Regex Mask generators, you cannot configure a sub-generator to be consistent with another column.

Last updated