Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Address Validator Transformation
  4. Aggregator Transformation
  5. Association Transformation
  6. Bad Record Exception Transformation
  7. Case Converter Transformation
  8. Classifier Transformation
  9. Cleanse transformation
  10. Comparison Transformation
  11. Custom Transformation
  12. Custom Transformation Functions
  13. Consolidation Transformation
  14. Data Masking Transformation
  15. Data Masking Examples
  16. Decision Transformation
  17. Duplicate Record Exception Transformation
  18. Dynamic Lookup Cache
  19. Expression Transformation
  20. External Procedure Transformation
  21. Filter Transformation
  22. HTTP Transformation
  23. Identity Resolution Transformation
  24. Java Transformation
  25. Java Transformation API Reference
  26. Java Expressions
  27. Java Transformation Example
  28. Joiner Transformation
  29. Key Generator Transformation
  30. Labeler Transformation
  31. Lookup Transformation
  32. Lookup Caches
  33. Match Transformation
  34. Match Transformations in Field Analysis
  35. Match Transformations in Identity Analysis
  36. Merge Transformation
  37. Normalizer Transformation
  38. Parser Transformation
  39. Rank Transformation
  40. Router Transformation
  41. Sequence Generator Transformation
  42. Sorter Transformation
  43. Source Qualifier Transformation
  44. SQL Transformation
  45. Using the SQL Transformation in a Mapping
  46. Stored Procedure Transformation
  47. Standardizer Transformation
  48. Transaction Control Transformation
  49. Union Transformation
  50. Unstructured Data Transformation
  51. Update Strategy Transformation
  52. Weighted Average Transformation
  53. XML Transformations

Transformation Guide

Transformation Guide

Masking Data with an Expression Transformation

Masking Data with an Expression Transformation

Use the Expression transformation with the Data Masking transformation to maintain a relationship between two columns after you mask one of the columns.
For example, when you mask account information that contains start and end dates for insurance policies, you want to maintain the policy length in each masked record. Use a Data Masking transformation to mask all data except the end date. Use an Expression transformation to calculate the policy length and add the policy length to the masked start date.
This example includes the following types of masking:
  • Key
  • Date blurring
  • Number blurring
  • Mask formatting
This example is the M_CUSTOMER_ACCOUNTS_MASKING.xml mapping that you can import to your repository from the
client\samples
folder.
A customer database table called Customers_Prod contains sensitive data. You mask the data in each column and write the test data to a target table called Customers_Test.
Mask the following Customer_Accounts_Prod columns:
Column
Datatype
AcctID
String
CustID
Integer
Balance
Double
StartDate
Datetime
EndDate
Datetime
The following figure shows the mapping that you can import:
""
The mapping has following transformations along with a source and target:
  • Source Qualifier.
    Passes the AcctID, CustID, Balance, and Start_Date to the Data Masking transformation. It passes Start_Date and End_Date columns to an Expression transformation.
  • Data Masking transformation
    . Masks all the columns except End_Date. The Data Masking transformation passes the masked columns to the target. It passes the policy start date, end date, and the masked start date to the Expression transformation.
    The Data Masking transformation masks the following columns
    :
    Input Port
    Masking Type
    Masking Rules
    Description
    Output Destination
    AcctID
    Random
    Mask format
    AA+DDDDD
    Result String Replacement Characters
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
    The first two characters are uppercase alphabetic characters. The third character is a dash and is not masked. The last five characters are numbers.
    Customer_Account_Test target
    CustID
    Key
    Seed = 934
    The seed is 934. The CustID mask is deterministic.
    Customer_Account_Test target
    Balance
    Random
    Blurring
    Percent
    Low bound = 10
    High bound = 10
    The masked balance is within ten percent of the source balance.
    Customer_Account_Test target
    Start_Date
    Random
    Blurring
    Unit = Year
    Low Bound = 2
    High Bound = 2
    The masked start_date is within two years of the source date.
    Customer_Account_Test target
    Exp_MaskEndDatetransformation
  • Expression transformation.
    Calculates the masked end date. It calculates the time between the start and end dates. It adds the time to the masked start date to determine the masked end date.
    The expressions to generate the masked end date are:
    DIFF = DATE_DIFF(END_DATE,START_DATE,'DD') out_END_DATE = ADD_TO_DATE(out_START_DATE,'DD',DIFF)
    The Expression transformation passes out_END_DATE to the target.

0 COMMENTS

We’d like to hear from you!