Skip to main content
Delphix

Algorithm - Date Shift (DS)

 

Applicable Delphix Masking Versions

  • 5.2.x
  • 5,1.x
  • 5.0.x
  • 4.x

At a Glance

Description:

This page describes three built-in algorithms. The masked value is calculated.
The algorithms are fast and lightweight.

Characteristics:  
 
Type
Referential
Integrity1

1:1  Mapping2

Strength
Discrete Code based Yes  No - day duplicated Medium
Fixed Code based Yes Yes Weak
Variable Code based No - Random No - day duplicated Strong

1 Referential Integrity - The masked value will be the same between job executions as well as tables.
2 1:1 Mapping - The masked value will be mapped uniquely to the input value within masked column.

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.

 

High-Level Overview

There are three Date Shift algorithms built in: 

  • 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)
    • Randomise the day of the month. 
    • Will not mask to the same value. 
    • Can create duplicates.
    • Will not maintain referential integrity. 

UI - Creation and Modification 

These algorithms are built-in and can not be created or modified. 

To select them, go to the Inventory and select the desired Algorithm in the algorithm drop down.

Notes

Date

The algorithm is only masking the day part of the date (timestamp). The year, month, hour, min,... is (intact) left as is. 

Date Formats

You must specify a Date Format, this field appears when you select a 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 you desire should the date format be in the list. 

Memory Requirements

These algorithms have 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
+-----+---------------------+---------------------+---------------------+---------------------+

 

Additional Information

Information on Delphix documentation: