Support Article
CSVParseException: Quotation is not closed
SA-71364
Summary
A dataset rule of type File is created which points to a CSV file with a new line character in its data value. Parsing error occurs on running a data flow using this dataset as the primary data source.
Error Messages
Caused by: com.pega.bigdata.dataset.parsers.CSVParseException: Quotation is not closed
at com.pega.bigdata.dataset.parsers.CSV.parseRow(CSV.java:37)
at com.pega.bigdata.dataset.parsers.CSVWithTargetPropertiesRowParser.parse(CSVWithTargetPropertiesRowParser.java:39)
at com.pega.bigdata.dataset.parsers.CSVRowParser.parse(CSVRowParser.java:44)
at com.pega.bigdata.dataset.parsers.CSVRowParser.parse(CSVRowParser.java:8)
Steps to Reproduce
- Create a file dataset which points to a simple CSV file stored in a repository.
- Ensure the CSV file is formatted to use double quotes around all fields in the file.
- Ensure the CSV file contains at least one text field.
- Add at least three records in the file.
- Ensure one of the records has a value in the text field which contains a new line.
For example,
userid, age, textfield,name"111","29","dummy text","name1"
"222","33","dummy text with
new
line", "name2"
"333","36","dummy text with no new lines","name333"
- Load a file such as the above sample in to the decision data store.
Root Cause
The failure occurs while the CSV parser parses the new line character. Parsing a new line character in CSV is not supported.
Resolution
An enhancement request, FDBK-29713, is created for consideration by Pega Product Management.
Published January 19, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.