The Generate double number in range masking activity allows you to generate a random double number, in the selected range.
Table of contents |
---|
Usage |
Example |
Handler configuration |
Properties |
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 0
and 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 x => x.Amount or choose property from the dropdown list |
EnforceUnique | If true, random selection should select unique values. | true or false |
|
Max | Maximal number to generate. | 78000000 |
|
Min | Minimal number to generate. | 0 |
|
Input: Filter | Filter | Expression used for filtering records - only filtered items will be masked. | x => x.Amount.IsBetween(0, 78000000) |
Input: Handler | Handler | Used for generate double numbers | Handle.WithBulk().ConvertDecimalToDouble("Column1", "Column2", "Column3", "Column4", ...) |
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. | GenerateDoubleNumberInRangeRepeater |
RepeatingKey | Key to use for repeating detection. | Write x => CompositeKey.Create(x.Amount) or choose properties from the pop-up window |
|
Misc | DisplayName | Display name of the activity in the workflow. | Generate double number in range |
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.
https://www.ekobit.com/ https://bizdatax.com/ https://bizdatax.com/support/