Generate from pattern - 7.3

Data privacy

Version
7.3
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Data Quality components > Data privacy components
Data Quality and Preparation > Third-party systems > Data Quality components > Data privacy components
Design and Development > Third-party systems > Data Quality components > Data privacy components
Last publication date
2024-04-03

This function generates a value based on a user-defined pattern.

This function is applied only on Strings.

Option Description
Extra parameter This function requires an extra parameter.

The extra parameter is a pattern that follows those rules:

  • A is replaced with a random Latin uppercase letter.
  • a is replaced with a random Latin lowercase letter.
  • 9 is replaced with a random digit.
  • H is replaced with a random Hiragana character.
  • K is replaced with a random full-width Katakana character.
  • k is replaced with a random half-width Katakana character.
  • C is replaced with a random Kanji character.
  • G is replaced with a random Hangul character.

All other characters are copied to the generated value as is.

For more information about the supported character types and the related Unicode ranges, see Data masking functions in the masking components.

You can also use numbered backreferences (\\<number>) using the following syntax: <pattern>\\<number>,<group1>,<groupN>.

  • <pattern> corresponds to the pattern to be used for generating the output value.
  • \\<number> is a numbered backreference. <number> identifies the position of the group placed after the "," character.
  • <group1>,<groupN> are comma-separated groups of characters. Each group is treated as a single unit. If a backreference calls a group, it is added as is in the generated value.

If you want to copy a character used in patterns (A, a, 9, H, h, K, k, C, G) as is in the generated value, use a backreference.

This function does not work correctly if a comma ',' is used in the pattern.

In the following example:
  • a characters are replaced with random Latin lowercase letters.
  • s characters are not masked in the generated output.
  • \\2 calls the group placed after the second "," character, which is @talend.com.
Input value Extra parameter Example of a masked value
A26 "aaaass\\2,@gmail.com,@talend.com" hjdfss@talend.com
In the following example:
  • \\3 calls the group placed after the third "," character, which is a.
  • 9 characters are masked with random digits.
Input value Extra parameter Example of a masked value
A26 "\\39999,D,Z,a" a4825