Skip to main content
Delphix

KBA1754 Min Max Algorithm

At a Glance

Versions: Applicable Delphix Masking versions: 4.x, 5.0.x, 5.1.x, 5.2.x, 5.3.x
Description:

This algorithm has a specific use. It is used to normalize data within a range – for example, 18 to 80. Any value below or above that is trimmed and moved to the min or the max value. If a non-numeric value is used (that is, not available), this can be replaced with a value specified in the Out of Range Replacement Value. 

This algorithm works also on multiple values in a string.

Characteristics:
 
Type
Unique
Lookup1
Referential
Integrity2

1:1 Mapping3

Strength

Comment
Min-Max Algorithm n/a n/a n/a Edge case  

This algorithm trims identifying edge values and is not masking any other value. 

Unique Lookup - Not applicable. 
Referential Integrity - Not applicable.
1:1 Mapping - Not applicable.

Character 
Encodings:

US-ASCII 7 bit numeric characters.
Data Types: number, int, date, char, varchar, text and variants. 

Lookup Pool Size: Not applicable.
Limitations: Is not masking any values (use Secure Lookup for that). 
Customization:

Creation: Min, max and if used Out of range Replacement value.

Modify: All parameters can be modified. 

 

High-Level Overview

This algorithm is trimming low and high edge values and sets them to the nearest min and max value. For any other string not being a value, these can be converted to a value/string specified in Out of range Replacement Value. 

This works for numbers and dates and one or multiple values in a string with text. 

UI - Creation and Modification 

The Min-Max algorithm has to be created and is accessed from the tab Settings and under the submenu Algorithm.

Creation and modification are done by: 

  • To create click "Add Algorithm".
  • To modify click the green pen in the "Edit" column.

 User Interface

The following popup is accessed when creating and modifying the algorithm:

Masking UI - Algorithm - MinMax .png

Creation and Modification

All parameters except the name can be modified. 

  1. Algorithm Properties
    • Algorithm Name (create only)
    • Description
  2. Algorithm Parameters
    • Number Range with Min and Max 
    • Date Range with Min Date and Max Date
    • Out of range Replacement Values

Special features

This algorithm has many features. Below are some of them highlighted:

  • Algorithm-based.
  • Very small memory usage.
  • Fast.
  • Multiple values in a string
    • This algorithm works on multiple values in a string - this is great if all values in a text are to be 'masked'.
  • Replacement Value
    • If a value is replaced with a word (for example "n/a") for a specific reason - these strings can be replaced with a value. This can be for example the CEO's salary - which might have been specified as 'unknown' - but will also identify the CEO in the data. The string 'unknown' can, therefore, be replaced with a value. 

Consideration

Replacement Value

When using Replacement Value - this will not work in a text string as all text in the string will be replaced with the value/string in the Out of range Replacement Value. 

Note 1: If the data type is date or number - the replacement value can't be a string.

Note 2: If the value string is constructed by two words - both words will be replaced.

Examples

Below are three example of masked results. Three algorithms have been used - one without Out of range Replacement Value (OorRV) and two with (one with a number and one with a string). 

+---------------+-----+-----+-------+
| Algorithm     | Min | Max | OorRV |
+---------------+-----+-----+-------+
| MinMax        |  10 |  30 |    25 |
+---------------+-----+-----+-------+
| MinMax_OorRV1 |  10 |  30 |    25 |
+---------------+-----+-----+-------+
| MinMax_OorRV2 |  10 |  30 |    na |
+---------------+-----+-----+-------+

Result

+----+------------------------+-------------------------+-------------------+-------------------+
|    |                        |                         | Masked            | Masked            |
| ID | Orig                   | Masked                  | w OorRV = 25      | w OorRV = na      |
+----+------------------------+-------------------------+-------------------+-------------------+
| 1  | 1                      | 10                      | 10                | 10                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 2  | 5                      | 10                      | 10                | 10                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 3  | 10                     | 10                      | 10                | 10                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 4  | 15                     | 15                      | 15                | 15                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 5  | 20                     | 20                      | 20                | 20                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 6  | 50                     | 30                      | 30                | 30                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 7  | 100                    | 30                      | 30                | 30                | 
+----+------------------------+-------------------------+-------------------+-------------------+
| 8  | unknown                | unknown                 | 25                | na                | << Using OorRV the text is replaced with a value.
+----+------------------------+-------------------------+-------------------+-------------------+
| 9  | n/a                    | n/a                     | 25                | na                |
+----+------------------------+-------------------------+-------------------+-------------------+
| 10 | n a                    | n a                     | 25 25             | na na             | << Space separates words and that means two replacements.
+----+------------------------+-------------------------+-------------------+-------------------+
| 11 | Txt1 1 Txt2 15 Txt3 50 | Txt1 10 Txt2 15 Txt3 30 | 25 10 25 15 25 30 | na 10 na 15 na 30 | << The algorithm works on long text strings. 
+----+------------------------+-------------------------+-------------------+-------------------+

Additional Information

Delphix Documentation (version 5.2.5):