This repo is an example about how to concat large files using Node.js
Restore dependencies with npm install
-
There are the producer data in ./produceData that will create files with 300K items+. Run
npm run create-files
to produce these files on ./files. It uses thechild_processes
module to process data in parallel in different files. -
There are the concatener in ./index.js that will concat all
.csv
files and generate thefinal.csv
file with all entries. It will convert data from csv, onname
field it will replace spaces by underscore (_
) then convert to csv again and finally save its output onfinal.csv
.