The Date Shift framework masks date values to different dates based on a specified range around the input value. Masked values are calculated algorithmically using the algorithm's key, so rekeying the algorithm will cause different outputs to be generated for each input. All valid input values will be masked to a new value, and the new value will never match the input.
Configuration options
| Options | Description |
|---|---|
| Minimum range |
Minimum shift applied to the input value, expressed in the selected unit of time. Negative values represent shifts into the past, and positive values represent shifts into the future. These values provide a range in which the masked value will differ from the input given a specified unit of time. The range is inclusive of both values where negative values represent units of time in the past and positive values represent units of time in the future. 0 may be included in the range or as one of the range values, but the input will not mask to the same value. A minimum value and maximum value that are equal will result in a fixed shift of that amount of time. For example, entering 3 as a min value and 3 as a max value with a unit of Days will mask all input values to 3 days in the future. |
| Maximum range |
Maximum shift applied to the input value, expressed in the selected unit of time. These values provide a range in which the masked value will differ from the input given a specified unit of time. The range is inclusive of both values where negative values represent units of time in the past and positive values represent units of time in the future. 0 may be included in the range or as one of the range values, but the input will not mask to the same value. A minimum value and maximum value that are equal will result in a fixed shift of that amount of time. For example, entering 3 as a min value and 3 as a max value with a unit of Days will mask all input values to 3 days in the future. |
| Roll | Preserves all time units larger and smaller than the selected unit. Only the specified unit is shifted. This option is supported for units months, days, hours, minutes, and seconds. |
| Unit | Defines the unit of time used for the shift range. Supported values include Years, Months, Days, Hours, Minutes, and Seconds. |
Important notes
-
If 0 is included in the range, it is never used to avoid masking a value to itself.
-
To create a Fixed Date Shift, set the same value for both Min and Max.
-
Fixed Date Shift preserves uniqueness and referential integrity, unlike variable ranges.
-
This is required for deterministic output (e.g., data joins and unique keys).
-
The range defined by Minimum range and Maximum range is inclusive.
Example
Example configuration:
-
Minimum range: 3
-
Maximum range: 5
-
Unit: Days
Possible masked values:
2021-02-03 12:30:00 → 2021-02-06 12:30:00
1905-12-10 00:00:00 → 1905-12-15 00:00:00
2001-07-31 23:45:30 → 2001-08-04 23:45:30
Example configuration with Roll enabled:
2021-02-25 10:00:00 → 2021-02-01 10:00:00
1932-05-03 01:15:15 → 1932-05-08 01:15:15
1999-08-31 18:30:00 → 1999-08-03 18:30:00
All inputs with the same value masked using the same configuration will produce the same output values.
Create an algorithm using this framework
To create an algorithm using this framework, follow the steps in Create an algorithm and select Date Shift during the Configuration step.