Algorithm: Date Shift (KBA1812)
There are three built-in Date Shift algorithms:
- DATE SHIFT(DISCRETE)
- Will mask to all dates in a specific year-month to the same day
- Creates duplicates within the same year-month
- Will maintain referential Integrity
- DATE SHIFT(FIXED)
- Will offset all dates by day of the month by a specific value
- Will not create duplicates - 1:1 mapping
- Will maintain referential Integrity
- DATE SHIFT(VARIABLE)
- Randomize the day of the month
- Will not mask to the same value
- Can create duplicates
- Will not maintain referential integrity
At a Glance
Description: |
This page describes three built-in algorithms. The masked value is calculated. |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Characteristics: |
1 Referential Integrity - The masked value will be the same between job executions as well as tables. |
||||||||||||||||
Data Type: | Date, DateTime, char, varchar, nchar, nvarchar. | ||||||||||||||||
Character Encoding: |
Numeric values - in any date format (with the year, month and day). |
||||||||||||||||
Lookup Pool Size: | Not applicable - there is none. | ||||||||||||||||
Limitations: | Will only mask day in the date. Year and month will stay the same. | ||||||||||||||||
Customization: |
None. |
Creating and Modifying Algorithms using the User Interface
These algorithms are built-in and cannot be created or modified.
To select them, go to the Inventory and select the desired Algorithm using the selector.
Date
The algorithm masks only the day part of the date (timestamp).
The year, month, hour, min,... is (intact) left as is.
Date Formats
A date format must be specified, this field appears when you select the DATE SHIFT algorithm from the Masking Algorithm dropdown list.
The default format is yyyy-MM-dd and the list contains some common formats. You can also type the date format desired if the date format is listed.
Memory Requirements
These algorithms have a very small memory footprint.
Issue
Special characters and non-dates might cause the algorithm to fail.
Examples
Below are examples of the three algorithms: Discrete, Fixed, and Variable.
+-----+---------------------+---------------------+---------------------+---------------------+ | Ref | Source | Discrete | Fixed | Variable | +-----+---------------------+---------------------+---------------------+---------------------+ | 1 | 2018-03-01 | 2018-03-20 | 2018-03-06 | 2018-03-05 | +-----+---------------------+---------------------+---------------------+---------------------+ | 2 | 2018-03-01 | 2018-03-20 | 2018-03-06 | 2018-03-07 | << Same source date, +-----+---------------------+---------------------+---------------------+---------------------+ Variable different | 3 | 2018-03-02 | 2018-03-20 | 2018-03-07 | 2018-03-11 | +-----+---------------------+---------------------+---------------------+---------------------+ | 4 | 2018-03-03 | 2018-03-20 | 2018-03-08 | 2018-03-13 | +-----+---------------------+---------------------+---------------------+---------------------+ | 5 | 2018-03-30 | 2018-03-20 | 2018-03-04 | 2018-03-05 | +-----+---------------------+---------------------+---------------------+---------------------+ | 6 | 2018-03-31 | 2018-03-20 | 2018-03-05 | 2018-03-10 | +-----+---------------------+---------------------+---------------------+---------------------+ | 7 | 2019-04-03 | 2019-04-28 | 2019-04-08 | 2019-04-07 | +-----+---------------------+---------------------+---------------------+---------------------+ | 8 | 2019-04-04 03:30:04 | 2019-04-28 03:30:04 | 2019-04-09 03:30:04 | 2019-04-11 03:30:04 | << Date with time +-----+---------------------+---------------------+---------------------+---------------------+