Test Data Manager

 View Only

HASHLOV for consistent masking of NAMES in XML data type

  • 1.  HASHLOV for consistent masking of NAMES in XML data type

    Posted 12 days ago

    Dear Team,

    We have requirement to mask customer names in different tables where data is store in XML document/ XML data type format in database column.

    Details below: Lets assume we have TABLE A having the XPATH (just like column in case of relational DB) to mask. Please see below the table explaining what is happening and what is expected from Comments/ Explanation section.

    TABLE XPATH/ COLUMN FUNCTION PRE-MASKED SAMPLE MASKED SAMPLE Comments/ Explanation
    TABLE A XMLRECORD/row/c2[1] HASHLOV(FULL NAME) Daniel Jared Ellen Ufer This XPATH 'XMLRECORD/row/c2[1]' is storing  full name which is changed to a new full name as 'Ellen Ufer' whereas we are expecting this to be changed to 'Phil Vernon' as the XPATH in 'XMLRECORD/row/c3[1]' is storing FIRST NAME which is changed from 'Daniel' to 'Phil'. And the XPATH 'XMLRECORD/row/c62[1]' is storing LAST NAME which is changed from 'Jared' to 'Vernon'. So the FULL NAME should be the combination of FIRST NAME and LAST NAME and it has to be consistent.
    TABLE A XMLRECORD/row/c3[1] HASHLOV(FULL NAME) Daniel Phil  The XPATH 'XMLRECORD/row/c3[1]' is storing FIRST NAME which is changed from 'Daniel' to 'Phil'.
    TABLE A XMLRECORD/row/c61[1] HASHLOV(FULL NAME) Daniel Phil  The XPATH 'XMLRECORD/row/c6[1]' is storing FIRST NAME which is changed from 'Daniel' to 'Phil'.
    TABLE A XMLRECORD/row/c62[1] HASHLOV(FULL NAME) Jared Vernon  The XPATH 'XMLRECORD/row/c62[1]' is storing LAST NAME which is changed from 'Jared' to 'Vernon'. 

    More Details below:

    1. The TABLE A has only two column as RECID and XMLRECORD where RECID is primary key and XMLRECORD column is having data as XML document.                    
    2. We do not want to use RECID as HASH COLUMN as there are other tables where FIRST NAME & LAST NAME of customer is present and the values has to be same post masking however the RECID in those tables are different to TABLE A. If we use RECDID as HASH COLUMN then the masking value in TABLE A and other tables will be different.                    
    3. We have seed list in database in SCRAMBLED DB and we have seed data in table gtsrc_reference_data where rd_ref_id is FULL NAME values are stored like below:
      rd_ref_value- Full Name
      rd_ref_value3 - First Name
      rd_ref_value4 - Last Name   
    4. We can not use/ don't want to use CONTACT function as the data is STORED in XML format inside a database column. So we can not add a CONCAT on the XPATH , we do not have columns here.