Developer Transformation Guide > Data Masking Transformation > Data Masking Example
  

Data Masking Example

A developer needs to create test data for customer applications. The data must contain realistic customer data that other developers can access in the company development environment.
The developer creates a data service that returns masked customer data such as the the customer ID, credit card number, and income. The mapping includes a Data Masking transformation that transforms the customer data.
The following figure shows the mapping:
""
The mapping has the following transformations:

Read_Customer Data

The customer data contains the following columns:
Column
Datatype
CustomerID
Integer
LastName
String
FirstName
String
CreditCard
String
Income
Integer
Join_Date
Datetime (MM/DD/YYYY)
The following table shows sample customer data:
CustomerID
LastName
FirstName
CreditCard
Income
JoinDate
0095
Bergeron
Barbara
4539-1686-3069-3957
12000
12/31/1999
0102
Brosseau
Derrick
5545-4091-5232-8948
4000
03/03/2011
0105
Anderson
Lauren
1234-5678-9012-3456
5000
04/03/2009
0106
Boonstra
Pauline
4217-9981-5613-6588
2000
07/07/2007
0107
Chan
Brian
4533-3156-8865-3156
4500
06/18/1995

Customer Data Masking Transformation

The Data Masking transformation masks all columns in the customer row except first and last name.
The Data Masking transformation performs the following types of masking:
The following table shows the masking rules for each port in the Data Masking transformation:
Input Port
Masking Type
Masking Rules
Description
CustomerID
Key
The seed is 934.
The customer ID does not have any mask format.
Result string replacement characters are 1234567890.
The CustomerID mask is deterministic.
The masked customer ID contains numbers.
LastName
No Masking
-
-
FirstName
No Masking
-
-
CreditCard
CreditCard
-
The Data Masking transformation masks the credit card number with another number that has a valid checksum.
Income
Random
Blurring
Percent
Low bound=1
High bound=10
The masked income is within ten percent of the source income.
JoinDate
Random
Blurring
Unit=Year
Low Bound =5
HighBound=5
The masked date is within 5 years of the original date.

Customer Test Data Results

The Customer_TestData transformation receives realistic customer data from the Data Masking transformation.
The Customer_TestData target receives the following data:
out-CustomerID
out-LastName
outFirstName
out-CreditCard
out-Income
out-JoinDate
3954
Bergeron
Barbara
4539-1625-5074-4106
11500
03/22/2001
3962
Brosseau
Derrick
5545-4042-8767-5974
4300
04/17/2007
3964
Anderson
Lauren
1234-5687-2487-9053
5433
09/13/2006
3965
Boonstra
Pauline
4217-9935-7437-4879
1820
02/03/2010
3966
Chan
Brian
4533-3143-4061-8001
4811
10/30/2000
The income is within ten percent of the original income. The join date is within five years of the original date.