Test Data Manager

  • 1.  Comma delimited File Masking

    Posted Sep 14, 2018 04:32 PM

    Hi All,

     

    I have a comma delimited file to be masked and the strings in the fields are enclosed with double quotes ("). The client wants this to remain, but after masking the file the " are getting dropped from the file.

    Ex:

    Input file:

    "I","VALUE","ABC,DEF","GET"

     

    Output file:

    I,MASKED,"ABC,DEF",GET

     

    Expected:

    "I","MASKED","ABC,DEF","GET"

     

    Any help much appreciated.

     

    Thanks

    Azar



  • 2.  Re: Comma delimited File Masking

    Posted Sep 14, 2018 05:41 PM

    Azar,

     

    If you go into perform actions on registried objects -> right click -> View file difinition, you'll see that quoted strings is un checked:

     

    You'll need to re-register your file definition. Make sure you set 'CHARQUOTED' or 'QUOTED_STRINGS' = Y in the definition file:

    Register Flat Files - CA Test Data Manager - 4.6 - CA Technologies Documentation 

     

    Regards,

    Sean



  • 3.  Re: Comma delimited File Masking

    Posted Sep 16, 2018 08:29 PM

    Thanks Sean for the response.

     

    I should have provided more details. I'm using FDM version 4.7.500.16.

     

    Could you please suggest me any solution in this version or if there is an alternate approach.

     

    Thanks

    Azar



  • 4.  Re: Comma delimited File Masking

    Broadcom Employee
    Posted Sep 17, 2018 04:15 AM

    Hi Azar,

     

    in FDM in the options you can set RETAINDOUBLEQUOTESINDATA to Y. That will retain the double quoutes.

     

    Regards,

    Peter



  • 5.  Re: Comma delimited File Masking

    Posted Sep 17, 2018 09:35 AM

    Thanks Peter.

     

    I did try, but output is still not as expected

     

    Input file:

    "I","VALUE","ABC,DEF","GET"

     

    Output file:

    I,MASKED,"""ABC,DEF""",GET

     

    Expected:

    "I","MASKED","ABC,DEF","GET"



  • 6.  Re: Comma delimited File Masking
    Best Answer

    Posted Sep 17, 2018 10:33 AM

    Azar,

     

    I did the following...

     

    Created a csv file with your data, but added a header to it (I was having problems parsing it without the header):

    v1,v2,v3,v4
    "I","VALUE","ABC,DEF","GET"

     

    Click the create definition file button:

     

    Select Comma Separated, header lines: 1, check Character data is quoted, Click parse file to mask:

     

    Notice that the v3 and v4 columns are parse incorrectly since that data has an embedded comma, this can be ignored for now.

     

    Click OK. This will populate a definition file which will look like this:

    HEADER=1,TRAILER=,DELIM=<COMMA>,DATEQUOTED=,CHARQUOTED=Y,NUMQUOTED=Y
    v1
    v2
    v3
    v4

     

    I did NOT set the RETAINDOUBLEQUOTESINDATA to Y since the file definition specifies that char data is quoted.

     

    I then masked the data using formatencrypt and the results:

    v1,v2,v3,v4
    "D","QIRYR","VJI,HRJ","BMZ"

     

    If you continue to have problems, feel free to open a support case and provide a sample CSV file with 2 rows and the header (if any).


    If you encounter problems parsing, run FDM in debug and provide the log file as well:

    1. Open a command prompt
    2. C:\Program Files\Grid-Tools\FastDataMasker
    3. java -jar GTMAPPER.exe > %TEMP%\fdm.log 2>&1

     

    FDM will log to "%TEMP%\fdm.log" which is generally "C:\Users\[username]\AppData\Local\Temp\fdm.log"

     

    Optionally, you can create  your own file definition accordingly:

    Mask Data Stored in Flat Files - CA Test Data Manager - 4.6 - CA Technologies Documentation 

    You can then point to the definition file in the connection file accordingly (see 1st screenshot above).

     

    Regards,

    Sean