The Expression masking modifies the numeric value in any of three ways:
Incrementing or decrementing it by a set percentage or number.
Replacing it with a random value within a specified range.
Replacing it with a random value from a specified sequence.
The expression masking is suitable for:
Numeric fields that will not be statistically analyzed.
Preserving statistical information such as a column‘s minimum value, maximum value, sum, or average value, or consider using the Shuffle option instead.
Generating random values from a specified sequence is a good way to mask numeric primary keys such as employee or patient IDs. This option, called a "Scrambled Sequence", does not produce duplicate values, and so it does not violate the primary key constraint.
Used alone, incrementing or decrementing is probably not sufficient protection for sensitive data such as salary, because if even one original value is known, the pattern is easy to decipher. It is best to use this option in conjunction with masking on other fields such as names or other identifiers.
If you use a Scrambled Sequence to mask a primary key, make sure to select the Synchronized CUPS option as well, to ensure that the new primary key values are written to the corresponding foreign keys as well. This type of masking is applicable only on the numeric datatype columns.
You can apply Expression Masking in three ways:
Increment/Decrement: In this option, you can choose for Increment or decrement by a set percentage or number. On selecting the option i.e., Increment or Decrement, you can specify the minimum and maximum value either by changing it based on percentage or by value. Based on the range define, the masking value is calculated.
E.g., in the below image, when you select Change by % for Increment option, the percentage for the given value is calculated based on the range you define. Here, percentage is determined between the range 1 to 100.
Random: Using this option, you replace the data with random value within a specified range. Select this option to specify the minimum and maximum range. The data in the column is masked randomly from the range you define.
E.g., in the below image, the data in the target database is masked based on the range you define. Here, the actual data is masked between the range 500 to 50,000.
Scramble Sequence: Using this option, you can generate random value by specifying the starting range. The option does not produce duplicate values, and so it does not violate the primary key constraint.
The Start Value field contains the initial value from which the masking begins. The next field will be masked with the value, set in the Increment By field.
E.g., in the below image, 1000is the starting range from where the masking will begin and the next masked value in the field will be 11, 000 i.e. (1,000+ 10,000), where 10,000 is the Increment By value which is added in the Start Value to generate the new mask value.