See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/use-stre...
Using the fs module and streams, we can take a local file and perform ETL steps on it to transform the file into JSON and write it to disk. We can use a helpful node module from npm, csvtojson, to convert the csv data for us.
By the end of this tutorial, you should be able to:
Explain how to use the fs module to create read/write streams
Implement Transform streams to modify data as it passes through a stream
Understand how to handle error events with streams
Convert CSV data to JSON using streams
Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.