I have data records in my flat file with no record identifiers, so I created a default record in my dictionary and specified that as the default record in the flat file schema. I need to validate my data records for mandatory fields and some field length restrictions so I specified them when I defined my record in the dictionary. However, when I am trying to validate my invalid flat file against the schema, none of the validations are working. Does it mean that we cannot validate records with no definitions in our flat file or am I missing something ?
What parameters you set on the flatFile:convertToValues with validate=true and returnErrors = asArray and maxErrors = -1? then it should return errors list in the Results pipeline.
I have specified validate=“true” for the convertToValues service and yet it does not validate the default records. I have header and trailer records which have record identifiers and those get validated just fine . It’s only the data records which do not have the record identifiers that are not getting validated. I have specified certain fields as mandatory in the data records and if I am not passing any values, it should fail but it validates to true.
Please find the sample flat files attached. Basically, my flat file has a header and trailer with record identifiers and multiple data records with no record Identifiers.I have attached a copy of both the valid and invalid flat files. In the Invalid file I have only three fields in the first data record and the fourth field which is not present is mandatory. I have skipped the rest of the fields as well. When I run the invalid file against the schema it validates to true.