The Generate double number in range masking activity allows you to generate a random double number, in the selected range.
|Table of contents|
To use the Generate double number in range 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. Generating a double number in a specific range requires you to enter the start and end numbers of the range.
For more information, on when to use a Double or Decimal number generator, see Microsoft page: Floating-point numeric types.
In this example we want to generate a random double number from the 'Amount' column in the Transactions table for numbers where the whole number part of a decimal number is greater than 6 digits. The Generate double number in range is perfect for this situation.
First we place the Transactions activity into opened Package.xaml and put the Generate double number in range masking activity within it. Once placed, we select the Amount property that we want to mask with generated double numbers. We enter
78000000 as the numbers used for range generation so that every generated double number is in range. Number of decimal digits is defined according to the defined column in the base.
Figure 1: Generating decimal numbers in a specific range
To Generate double number in range in a table, replace the default
.Handle.WithBulk() part of the Handler expression with
Handle.WithBulk().ConvertDecimalToDouble("Column1", "Column2", "Column3", "Column4", ...) in every table masking activity in every Masking engine in the Package.xaml file. All Columns where Generate double number in range will be in use needs to be added in Handler configuration.
Figure 2: Handler
|Property group||Property name||Description||Example|
|Input properties||DataItemProperty||The property to mask.||Write
|EnforceUnique||If true, random selection should select unique values.||
|Max||Maximal number to generate.||
|Min||Minimal number to generate.||
|Input: Filter||Filter||Expression used for filtering records - only filtered items will be masked.||
|Input: Handler||Handler||Used for generate double numbers||
|SkipDefaultValues||If true, default values will be omitted in masking (i.e. null values are not masked).||
|Input: Repeating||RepeaterId||The ID of the repeater that will be used to detect repeating and save results when masking item key repeats.||
|RepeatingKey||Key to use for repeating detection.||Write
|Misc||DisplayName||Display name of the activity in the workflow.||
|Result||Contains the masking definition object. It's a part of the masking infrastructure and should be ignored.||-|
BizDataX Documentation © Built by Ekobit. All rights reserved.