We have run into an issue with FDM when trying to mask a CSV file. If there is no value in date field, we are seeing the following error:
Table : C:/FDM_JOBS/35346561/MyTest.csv Column: "Birth_DD"
Error parsing date:""
Dateformat : "dd"
message not found m0321-RowData for language:en("""Bitcoin\\""","""John""","""""","""04""","""1999""")
Unparseable date: """"
error parsing date value for function ADDDAYS
ALL Supported Releases of FDM
As an overview, below are samples of the source text file, and definition file being used.
Sample_doublequotes.txt (source file being masked) - the first line is the header information:
"Non_PII","Full_Name","Birth_DD","Birth_MM","Birth_YYYY"
"Bitcoin\\","John","","04","1999"
"Bitcoin\\","Bob","10","06","2000"
Sample _doublequotes_dm.txt (original definition file):
HEADER=Y,TRAILER=,DELIM=,,DATEQUOTED=N,CHARQUOTED=N,NUMQUOTED=N
"Non_PII"
"Full_Name"
"Birth_DD"
"Birth_MM"
"Birth_MM"
Sample_masking_configuration.csv (The original masking configuration): Notice that the Date Format uses is "dd" (bolded)
Table,Column,Function,Parm1,Parm2,Parm3,Parm4,Keep Nulls,Date Format,Cross Reference,Override SQL,Unique Columns,XPath Element,Substr start,Substr length,Notes,Preformat,Update,Use Masked Values,Restart Column,From Occurrence,To Occurrence,Parm5,Parm6,Parm7,Parm8,Parm9,Parm10
,"\"Birth_DD\"",ADDDAYS,3,,,,Y,"\"dd\"",,,,,,,,,,,,,,,,,,,
,"\"Full_Name\"",HASHLOV,Names,3,,,Y,,,,,,,,,,,,,,,,,,,,
Sample_masking_options.txt (Original options file):
AUDIT=ALL
AUDITDIR=C:\FDM_masking\AUDIT
AUDITFILE=backslash_audit.csv
BATCHSIZE=10000
CHUNKSIZE=10000
COMMIT=1000
FETCHSIZE=100000
IGNOREQUOTECHAR=Y
LOGDIR=C:\FDM_masking\LOGS
LOGFILENAME=backslash_log.txt
RETAINDOUBLEQUOTESINDATA=N
SEEDTABLE=gtsrc_reference_data
SEEDTABLECOLUMNS=rd_ref_id,rd_ref_value,rd_ref_value2,rd_ref_value3,rd_ref_value4,rd_ref_value5,rd_ref_value6,rd_ref_value7,rd_ref_value8,rd_ref_value9,rd_index
SEEDTABLECONNECT=connect_SCRAMBLE.txt
TRIMVALUES=Y
The reason FDM is throwing the error is because of the use of the IGNOREQUOTECHAR masking option is enabled. This option causes FDM to attempting to process "" as a date, which is causing the error:
Invalid Date Format and/or unparseable date value.
There are three changes need, to resolve this issue.
This can also be done in the Sample_masking_configuration.csv file, if you don't want to manually edit the FDM UI.
Table,Column,Function,Parm1,Parm2,Parm3,Parm4,Keep Nulls,Date Format,Cross Reference,Override SQL,Unique Columns,XPath Element,Substr start,Substr length,Notes,Preformat,Update,Use Masked Values,Restart Column,From Occurrence,To Occurrence,Parm5,Parm6,Parm7,Parm8,Parm9,Parm10
,"\"Birth_DD\"",ADDDAYS,3,,,,Y,"DD",,,,,,,,,,,,,,,,,,,
,"\"Full_Name\"",HASHLOV,Voya_Names,3,,,Y,,,,,,,,,,,,,,,,,,,,
With these three changes, the masking job runs successfully with the follow sample output:
Notice that both the Full_Name and Birth_DD fields were masked, when values were found in those fields.
Non_PII,Full_Name,Birth_DD,Birth_MM,Birth_YYYY
"Bitcoin\","Joseph","","04","1999"
"Bitcoin\","Melanie","13","06","2000"
Valid Data Formats can be found at Function Date Formats in the TDM Documentation.
See Mask Data Stored in Flat Files, for more information regarding working with Flat Files.