Struct Mask (StructMaskGenerator)
Last updated
Was this helpful?
Last updated
Was this helpful?
The generator applies selected generators to specific StructFields within a StructType in a Spark database.
For the Struct Mask generator, there is a link object for each path expression value to assign a sub-generator to.
The generator does not itself support consistency or differential privacy.
The metadata
object is populated from the object, and includes:
pathExpression
, which is the expression that identifies the value to apply the sub-generator to.
The types of values to apply the sub-generator to.
The subGeneratorMetadata
object, which identifies and configures the selected sub-generator.
In the following example replacement for the StructMask generator:
The value at the path expression $.address.city
is assigned the Address generator. The generator is configured to produce a city value. Consistency is disabled.
The value at the path expression $.address.zip
is also assigned the Address generator. The generator is configured to produce a zip code value. Consistency is disabled.