The Timestamp masking option can specifically be used for masking date values in the dataset. This type of masking generates random dates based on the range you define. This masking can also be used for generating the date values if its set to null.
This type of masking is applicable on all three types of datatypes i.e., string, numeric and date. The UI options differ based on the datatype of column.
In case, if a column has a string or numeric datatype, then you can specify the date range including the format for the timestamp.
In the Format Options panel, you can specify the maximum, minimum date value and a date format, based on which the value is generated.
Minimum Date and Maximum Date: This field lets you define the range of the date by selecting the minimum and maximum date. To select a date, click the Calendar in the field. This opens a calendar from where you can select a date as per your criteria.
You can navigate through calendar using the sliders provided next to the month name.
To view the list of all the months and years, click the drop-down provided next to the <month><year> heading.
Format: This field displays the list of date formats. There are three formats based on which the date and timestamp is generated. The formats vary based on the datatypes.
If the column datatype is string, then the three formats are:
If the column datatype is numeric, then the three formats are:
In case, if a column has a date datatype, then you can specify either increment/decrement of the date values or specify the date range based on which masking value is generated.
Increment By and Decrement By: The Increment By and Decrement By options are used for increasing or decreasing the original date values based on the range, you define. You can set the range of the days, months, and years in From and To fields.
*Note: If you opt for Increment By and Decrement By option in the Timestamp, then the date values cannot be generated for missing values. The existing values will be updated based on the range specified in the Increment By and Decrement By option.
Range: This option lets you define the timestamp range based on which the masking values is generated in the target database. Specify the Minimum and Maximum date range in the fields.
E.g., with reference to below image, if you want to mask or generate the data in the date_of_birth, date_of_joining, and date_of_resignation field with fake values to preserve the look and feel of the original data. You just need to select the Timestamp option in the Random and this will generate random valid date values which can be used either for masking the original data or for filling the null fields.
Here, we’ve few fields in date_of_birth, date_of_joining, and date_of_resignation columns that have missing values as well as data too.
When Timestamp masking is applied, then existing values were masked with the fake ones and missing, or null values are generated.
For instance, in the below image, the date of birth for emp_cd ‘101’ has been updated from 1991-02-20 to 2021-01-18 22:07:16. Similarly, there were null values for date_of_birth and date_of_resignation column for emp_cd ‘102’ which is now masked with values as highlighted in the below image.