cancel
Showing results for 
Search instead for 
Did you mean: 

CSV Validate Header writing documents to output

jervin
New Contributor III

A bit of help appreciated. I am trying to accomplish this with my pipeline:

  1. Use File Reader and CSV parser to read a CSV file.
  2. With the CSV Parser, validate the file and make sure the required headers exist.
  3. If the headers exist, do further processing on the file. If not, do not process the file further.

I have the CSV Parser set up with the required headers and the “Contains Headers” and “Validate Headers” option enabled. When I validate the pipeline I get an exception to the error view of the CSV parser (which is what I want), but the CSV Parser is also writing the records to the output. Any way to change this?

image

1 REPLY 1

Ajay_Chawda
Contributor

Hi jervin,

Please uncheck “Contains Headers” check box and set skip line =1 (assuming first line of file contains header information )

Please find the attachment for sample pipeline and row file which used as input or sample pipeline.

Regards,
Ajay
name.txt (51 Bytes) testCSVHeader_2021_02_03 (1).slp (3.9 KB)