cancel
Showing results for 
Search instead for 
Did you mean: 

Snaplogic CSV parser failing

Harsha3
New Contributor III

Hi Team,

While parsing a csv I got an “EOF reached before encapsulation token finished” error . However when checked each field is mapped to the header appropriately . After this error I again ran the pipeline without touching anything and we got the proper result . So is this error intermittent if not why on running again does not cause any problem , kindly advise.

image

Thanks,
Harshavardhana

8 REPLIES 8

evanhk
New Contributor II

I’m running into the same issue.

Shreyas_S
New Contributor

Hi All ,

Any update on this issue thread ? Even I am facing the same issue with the CSV File I am having.

ptaylor
Employee
Employee

@Harsha3 @evanhk @Shreyas.S I’m sorry no one has responded yet. Have any of you create a support ticket about this issue?

Hi @ptaylor ,

For my requirement use case , I do actually have an alternate solution for the issue from source end and have proceeded with the same . However would really like to understand the root cause for the same . We are receiving a CSV File from source system in Windows-1252 character set which we are using a Transcoder to change it to UTF-8 and then passing it to CSV Parser . Upon execution of the Snap after processing a certain no of records it is failing with the below error . As an alternate solution , we have asked the source system to change the character set as UTF-8 and push the file which is working without any issues.

Caused by: java.lang.RuntimeException: java.io.IOException: (startline 169) EOF reached before encapsulated token finished
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:442)
at org.apache.commons.csv.CSVParser$1.hasNext(CSVParser.java:452)
at com.snaplogic.snaps.transform.CSVParser.doWork(CSVParser.java:325)
… 12 more
Caused by: java.io.IOException: (startline 169) EOF reached before encapsulated token finished
at org.apache.commons.csv.Lexer.parseEncapsulatedToken(Lexer.java:300)
at org.apache.commons.csv.Lexer.nextToken(Lexer.java:152)
at org.apache.commons.csv.CSVParser.nextRecord(CSVParser.java:498)
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:439)
… 14 more
Reason: java.io.IOException: (startline 169) EOF reached before encapsulated token finished
Resolution: Please provide valid CSV data at line 168 or route it to the error view