Masking function HASHLOV always returns a NULL value when using Custom Seedlist
search cancel

Masking function HASHLOV always returns a NULL value when using Custom Seedlist

book

Article ID: 237999

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

While using a custom seedlist and using HASHLOV on a column different from the column being applied, the value always results in null no matter what the input is.

 

Environment

Fast Data Masker

Cause

Reviewing the TDM documentation and analyzing the results from the imported custom seed list inside the gtrep repository, we noticed is the first names are all showing as NULL. This is because the CSV file structure is off, and FDM is picking up the "name-value" pair as <firstname>,NULL. Causing the masking to always return the value NULL.

Looking at the first record in the example CSV (Line 2) we see:


CUSTOM_PERSON_NAMES,Dante,NULL,Brown,Smith,"Smith, Dante Brown",Dante B Smith,Dante B. Smith,Dante Brown Smith,Dante Smith,[email protected],71186

Where CUSTOM_PERSON_NAMES is the Category Name and all remaining comma-separated fields are considered name-value pairs. Resulting in the following

Name Value
Dante NULL
Brown Smith
"Smith Dante Brown"
Dante B Smith Dante B. Smith
Dante Brown Smith Dante Smith
[email protected] 71186

 

Resolution

Please refer to the TDM documentation: Propagate Seed List Data Across Masking Engines

------------------------------------

Considerations
Review the following considerations:
  • Ensure that the seed data is present in a CSV (comma-separated value) file. Each row in the CSV file represents a record in the repository database. The first value in the row represents the category name and the remaining items in the row represent the name-value pairs. For example, consider a row in the CSV file:
     
    Address-US,City,Plano,State,Texas
     
    In this example,
    • Address-US represents the category name
    • City,Plano and State,Texas represent the name-value pairs.


  • Remove the column headers from the CSV file.

  • If the CSV file contains non-ASCII characters, use UTF-8 encoding.

  • The minimum number of name-value pairs is one and the maximum is 30.

  • The SQL scripts that are used in this article are generic and are written considering the maximum allowed values. If you have fewer values in a row of a CSV file, change the SQL scripts accordingly.

  • If you only need to insert data into the Scramble database, where names are not required for the values, you can simplify the CSV file by providing only the category names and values. Also, you must modify the SQL query that is used for loading the CSV file into the table.

  • Some databases (for example, MS SQL and Teradata) expect that the number of values in each row of a CSV file must match the number of columns present in the database table. Therefore, if you have a CSV file where the number of values are not the same for each row, or the number of values are fewer than the number of table columns, you can use the provided PowerShell script. This script helps transform the CSV file into the format, required by the included SQL scripts. For more information about how to run this scripts, see, the Run the Transform Script section of the documentation.

To resolve the reported problem, we need to strip the header row from the CSV, restructure the file into Name/Value pairs, and reimport the corrected seed list into the scramble database. Then rerun the masking job.

Additional Information

For the exact steps, please refer to "Propagate Seed List Data Across Masking Engines"