- Node version: v10.19.0
- Npm version: 6.13.4
Npm package csvtojson Package Link
csvtojson({ "delimiter": ";", "fork": true }) .fromStream(fileReadStream) .subscribe((dataObj) => { console.log(dataObj); }, (err) => { console.error(err); }, (success) => { console.log(success); });
While trying to handle large CSV file (about 1.3 million records) I face error "CSV Parse Error: Error: unclosed_quote." after certain records(e.g. after 400+ records) being processed successfully. From the CSV file i don't see any problems with data formatting there, however the parser might be raising this error because of "\n" character being found inside the column/field value.
- Is there a solution already available with this package? or
- is there a workaround to handle this error? or
- is there a way to skip such CSV rows having any sort of errors not only this one, to let the entire CSV to JSON parsing work without the processing getting stuck?
Any help will be much appreciated.