Parsing CSV file that has header/trailer records throughout

I need to parse a CSV file that has header and trailer records throughout the file in unpredictable locations. What would be the best way to try and do this?

Unfortunately these records do not have the same number of data elements as the data records so the CSV parse pipline is failing.

<data records>
Store Trailer-PUW,01018,2019/01/15,49
Store HDR-PUW,1026,2019/01/15
<more data records>

Any suggestions? Thanks!

1 Like

I am new to SnapLogic. I just found that I could route the error data to the error view. It’s not ideal but I can handle it that way.

1 Like

Hi Shawn.McCormick
Possible to share pipeline or screen shot of pipeline how you achieve this requirement.

For the CSV Parser pipline the default error behavior is to “stop pipeline execution”. But if you change it to “route error data to error view” it will kick out the records/documents that don’t fit the parser formatting and it will continue to process the good data.