Generate text

The Generate text masking activity allows you to generate text using an IGenerator implementation before saving it to the database.

Table of contents


To use the Generate text masking activity, it must be placed inside a table masking activity or a similar activity that iterates over data. Once placed, select the property you want to mask. Next, enter a new instance of a generator to generate text values.


In this example we want to generate masked e-mails for the Customer table. We don't need to generate realistic e-mails, just ones that are in the valid e-mail format and make it clear they are masked. First we place the Customer masking activity into opened Package.xaml and put the Generate text masking activity within it. Once placed, we select the Email property that we want to mask with our text generator. For the generator, we enter a new instance of a string generator that also makes use of a number sequence generator so that our generated e-mails are unique.

Generating text Figure 1: Generating text


Property group Property name Description Example
Input properties DataItemProperty The property to mask. Write x => x.Email or choose property from the dropdown list
Generator Generator used to generate values. new NumberedStringGenerator("masked_email_{0}", new NumberSequenceGenerator(1,1))
Input: Filter Filter Expression used for filtering records - only filtered items will be masked. x => x.Email.StartsWith("a")
SkipDefaultValues If true, default values will be omitted in masking (i.e. null values are not masked). true or false
Input: Repeating RepeaterId The ID of the repeater that will be used to detect repeating and save results when masking item key repeats. GenerateTextRepeater
RepeatingKey Key to use for repeating detection. Write x => CompositeKey.Create(x.Email) or choose properties from the pop-up window
Misc DisplayName Display name of the activity in the workflow. Generate text
Result Contains the masking definition object. It's a part of the masking infrastructure and should be ignored. -