Parsing a CSV file using NodeJS

Issue

With nodejs I want to parse a .csv file of 10000 records and do some operation on each row. I tried using http://www.adaltas.com/projects/node-csv. I couldnt get this to pause at each row. This just reads through all the 10000 records. I need to do the following:

  1. read csv line by line
  2. perform time consuming operation on each line
  3. go to the next line

Can anyone please suggest any alternative ideas here?

Solution

Seems like you need to use a stream-based library such as fast-csv, which also includes validation support.

Answered By – Risto Novik

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.