Key Masking
Key masking produces deterministic results for the same source data, masking rules, and seed value. Mask date, numeric, and string datatypes with key masking.
The following table describes the parameters that you can configure for key masking:
Parameter | Description |
---|
Seed | A start number that enables the PowerCenter Integration Service to return deterministic data. You can mask the date, numeric, and string datatypes. |
Mask Format | The type of character to substitute for each character in the input data. You can limit each character to an alphabetic, numeric, or alphanumeric character type. You can mask the string datatype. |
Source String Characters | The characters in the source string that you want to mask. You can mask the string datatype. |
Result String Replacement Characters | Substitutes the characters in the target string. You can mask the string datatype. |
Mask Format
Configure a mask format to limit each character in the output column to an alphabetic, numeric, or alphanumeric character.
If you do not define a mask format, the PowerCenter Integration Service replaces each source character with any character. If the mask format is longer than the input string, the PowerCenter Integration Service ignores the extra characters in the mask format. If the mask format is shorter than the source string, the PowerCenter Integration Service does not mask the characters at the end of the source string.
Note: The mask format contains uppercase characters. When you enter a lowercase mask character, Test Data Manager converts the character to uppercase.
The following table describes mask format characters:
Character | Description |
---|
A | Alphabetical characters. For example, ASCII characters a to z and A to Z. |
D | Digits. From 0 through 9. |
N | Alphanumeric characters. For example, ASCII characters a to z, A to Z, and 0-9. |
X | Any character. For example, alphanumeric or symbol. |
+ | No masking. |
R | Remaining characters. R specifies that the remaining characters in the string can be any character type. R must appear as the last character of the mask. |
Source String Characters
Configure source string characters to choose the characters that you want to mask.
For example, if you set the number sign (#) as a source string character, it is masked every time it occurs in the input data. The position of the characters in the source string does not matter, and you can configure any number of characters. If you do not configure source string characters, the masking replaces all the source characters in the column.
The source characters are case sensitive. The PowerCenter Integration Service does not always return unique data if the number of source string characters is fewer than the number of result string characters.
The following table describes the options that you can configure for source string characters:
Option | Description |
---|
Mask Only | Masks characters in the source that you configure as source string characters. For example, if you enter A and b as source string characters, every instance of A and b in the source data will change. A source character that is not an A or b will not change. |
Mask all except | Masks all characters in the source except for source string characters. For example, if you enter "-" as the source string character, every character except for "-" will change. |
Result String Replacement Characters
Configure result string replacement characters to specify masking output.
The PowerCenter Integration Service replaces characters in the source string with the result string replacement characters. For example, enter the following characters to configure each mask to contain uppercase alphabetic characters A through F:
ABCDEF
To avoid generating the same output for different input values, configure a wide range of substitute characters, or mask only a few source characters. The position of each character in the string does not matter.
The following table describes the options for result string replacement characters:
Option | Description |
---|
Use only | Masks the source with only the characters you define as result string replacement characters. For example, if you enter the characters A, B, and c, the masking replaces every character in the source column with an A, B, or c. The word "horse" might be replaced with BAcBA. |
Use all except | Masks the source with any characters except the characters you define as result string replacement characters. For example, if you enter A, B, and c result string replacement characters, the masked data never has the characters A, B, or c. |
Date Key Masking
You can configure key masking with dates to generate deterministic output.
You can change the seed to match the seed value for another column to return repeatable datetime values between the columns.
The PowerCenter Integration Service can mask dates between 1753 and 2400 with key masking. The PowerCenter Integration Service always generates valid dates. If the source year is in a leap year, the PowerCenter Integration Service returns a year that is also a leap year. If the source month contains 31 days, the PowerCenter Integration Service returns a month that has 31 days. If the source month is February, the PowerCenter Integration Service returns "February."
Numeric Key Masking Parameters
You can configure key masking for numeric values and generate deterministic output.
When you configure a column for numeric key masking, you can select a seed value for the column. When the PowerCenter Integration Service masks the source data, it applies a masking algorithm that requires the seed.
You can change the seed value for a column to produce repeatable results if the same source value occurs in a different column. Configure repeatable results when you want to maintain a primary key-foreign key relationship between two tables. In each rule, enter the same seed value for the primary-key column as the seed value for the foreign-key column. The PowerCenter Integration Service produces deterministic results for the same numeric values. The referential integrity is maintained between the tables.
String Key Masking Parameters
Configure string key masking to mask all or part of a string. To limit the masking output to certain characters, specify a mask format and result string replacement characters. If you need repeatable output, specify a seed value.
The following table describes the masking parameters that you can configure for key masking string values:
Parameter | Description |
---|
Seed | A start number that enables the PowerCenter Integration Service to return deterministic data. Select a seed value between 1 and 1,000. Apply the same seed value to a column to return the same masked data values in different source data. |
Mask Format | The type of character to substitute for each character in the input data. You can limit each character to an alphabetic, numeric, or alphanumeric character type. |
Source String Characters | The characters in the source string that you want to mask. For example, mask the number sign (#) character whenever it occurs in the input data. Leave this field blank to mask all the input characters. The PowerCenter Integration Service does not always return unique data if the number of source string characters is less than the number of result string characters. |
Result String Replacement Characters | Substitutes the characters in the target string. For example, enter the following characters to configure each mask to contain uppercase alphabetic characters A through F: ABCDEF |