Example for configuring Parameters 3 and 5 when using HASHLOV1
search cancel

Example for configuring Parameters 3 and 5 when using HASHLOV1

book

Article ID: 370778

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

Please provide an example explaining how to configure the mandatory parameters when using HASHLOV1 masking function. We are specifically confused on what to use when setting parameters 3 and 5. What's the differences between the "Seed Column Bucket(s) #" and the "Restricted Values"?

Environment

FastDataMasker 4.10.536.0 and greater

Cause

Starting in FDM 4,10,536,0 a new mandatory parameter was added - Seed Column Bucket(s) #. This parameter gives FDM the ability to set multiple seed buckets on the reference (seed data). 

Resolution

In this example, we want to mask the cities within their respective States and Countries, so that when replacing the target city name, we choose the appropriate city name from the reference (seed data) from the corresponding States and Countries.

Target Table (the table we want to mask):

PK City State Country
1 ABC Minas Gerais Brazil
2 DEF Minas Gerais Brazil
3 GHI Minas Gerais Brazil
4 ABC Rio de Janerio Brazil
5 DEF Rio de Janerio Brazil
6 GHI Rio de Janerio Brazil
7 ABC Florida USA
8 DEF Florida USA
9 GHI Florida USA
10 ABC Georgia USA
11 DEF Georgia USA
12 GHI Georgia USA

 

Reference Table (Seed data):

ref_id City State Country rd_index
COUNTRY STATE CITY Vassouras Rio de Janerio Brazil 1
COUNTRY STATE CITY Barra do Pirai Rio de Janerio Brazil 2
COUNTRY STATE CITY Volta Redonda Rio de Janerio Brazil 3
COUNTRY STATE CITY Angra dos Reis Rio de Janerio Brazil 4
COUNTRY STATE CITY Cabo Frio Minas Gerais Brazil 5
COUNTRY STATE CITY Juiz de For a Minas Gerais Brazil 6
COUNTRY STATE CITY Belo Horizonte Minas Gerais Brazil 7
COUNTRY STATE CITY Uberlandia Minas Gerais Brazil 8
COUNTRY STATE CITY Uberaba Minas Gerais Brazil 9
COUNTRY STATE CITY Montes Claros Minas Gerais Brazil 10
COUNTRY STATE CITY Miami Florida USA 11
COUNTRY STATE CITY Tampa Florida USA 12
COUNTRY STATE CITY Orlando Florida USA 13
COUNTRY STATE CITY Jacksonville Florida USA 14
COUNTRY STATE CITY Boca Raton Florida USA 15

 

Criteria: When we run our masking job, we want the values in the Target table, in the City column (#2) to be replaced by the values in the City column (#1) in the Reference table, according to their respective State column (#2) and Country column (#3).

Expected outcome: for Row 1 of the Target Table, City ABC for Minas Gerais Brazil will be replaced with one of the corresponding values from the Reference Table, for Minas Greais Brazil.

 

To set this up if FDM, after connecting to the Target Table, and the Reference seed table (scramble database) in the FDM IU, we need to:

  1. Select the Seed Table to use as reference data
  2. Select the Seed Data Category
  3. Set the Seed Column # (Reference Table)
  4. Set the Seed Column Bucket(s) # (Reference Table)
  5. Set the Hash Column (Target Table) (optional)
  6. Set the Restricted Values (Target Table)

Where:

  • Data Category (ref_id) (Parm1)* - defines what seed data we will be using from the Reference Table (Seed data)
  • Seed Column # (Parm2)* - this is the column number of the value you want to use from the seed data (Reference table).
  • Seed Column Bucket # (Parm5)* - this is the column or columns you would like to set a restriction on, from the seed data (Reference table)
  • Hash Column (Override_SQL) - this is the column from the target table that you want FDM to build the hash values from.
  • Restricted Values (Parm3)* - this is the column names in the Target Table, that correlate to the Column Bucket(s) # from the Reference table.

    * Mandatory parameters

For example:

  • Data Category (Parm1) = COUNTRY STATE CITY (ref_id from the Reference Table) This tells FDM what set of seed data to use during the masking job. The tables containing reference data will contain multiple grouping of different types of reference data. In our example, we are using reference data related to cities, states, and countries, but there could also be reference data related to names related to male or female, or event by origin of countries. There could also be addresses related to cities, within cities, states and countries. Each grouping will be identified with a unique ref_id identifier. 
  • Seed Column # (Parm2) = 1 (City column from the Reference Table) This is because we want to replace the original City names in the Target table with a corresponding value from the Reference Table.
  • Seed Column Bucket # (Parm5) = 2,3 (City, State columns from the Reference Table) We are going to restrict the values of City to within the corresponding State and Country in side the Reference Table. Note: when using more than 1 column, the column index values must be separated by a comma.
  • Hash Column (Override_SQL) = City (City column from the Target table), We are choosing the City column because we have unique values within each State and Country, so our output values based on the hashing index will also be unique and have a less chance of duplicate values selected.
  • Restricted Values (Parm3) = State,Country (State and Country column names from the Target Table) We need to map the Column names to their respective Reference columns within the seed data. These need to be in the same order, otherwise the mapping will be incorrect. In this example, we are mapping the Target column State to Reference column 2, and we are mapping the Target column Country to Reference column 3. Note: when using more than 1 column, the column names must be separated by a comma.

After running our masking job, we see the following results:

PK City State Country
1 Uberlandia Minas Gerais Brazil
2 Cabo Frio Minas Gerais Brazil
3 Montes Claros Minas Gerais Brazil
4 Volta Redonda Rio de Janerio Brazil
5 Vassouras Rio de Janerio Brazil
6 Angra dos Reis Rio de Janerio Brazil
7 Orlando Florida USA
8 Miami Florida USA
9 Boca Raton Florida USA
10 ABC Georgia USA
11 DEF Georgia USA
12 GHI Georgia USA

Notice that the cities in Georgia were not masked. This is because there wasn't any reference data that matched the restrictions of State and County in the Reference Table for Georgia. Therefore, these cities remained unmasked.

Additional Information

For more information, see: Masking Functions and Parameters