The Number masking option let you define a range of output values by selecting minimum and maximum number. This masking is applicable on all columns having datatype string and numeric. The UI options differ based on the datatype of column.
Minimum – Define the output value by entering a Minimum number.
Maximum – Define the output value by entering a Maximum number.
Scale – The numeric value defined in this field indicate the number of decimal places to include in the number.
Padding – This option let you pads the value with leading zeros, if necessary, to achieve the specified field length of the number in Maximum textbox.
*Note: The Scale and Padding options are not available when column datatype is Numeric.
E.g., with reference to below image, if you want to mask the prod_price column to preserve the price of the product, then apply the Number masking in Random.
Here, we’ve added the range of number from 1 – 400 in minimum and maximum fields. The numbers generated post decimal will be round off to three digits. In case, if any number is less than three-digit length then zero is prefixed to it.
The final output displays the masked numbers in the target table. In the below image, you can see that the data in the prod_price column masked, and the numbers are generated within the specified range i.e., 1-400. Similarly, the scaling of digits post decimal is in three-digit format and the numbers which are less than three-digit before decimal places are padded with extra Zero which makes the data format equal across the column.