I need transform rows in csv file to json. I use csvtojson package and works like a charm, but my csv file is very huge, about 21.000.000 lines. :(
My node app does can process all lines.
See my snippet bellow.
csv({noheader:true,
delimiter:";",
workerNum: 4})
.fromFile(csvFilePath)
.on('json',(jsonObj, rowIndex)=>{
var TN = jsonObj.field1;
var cod_op = jsonObj.field2;
var msisdn = TN.toString();
//UP TO FIREBASE HERE!!!
noticia.child(msisdn).set(cod_op);
console.log(TN + ' ' + rowIndex);
})
.on('done',(error)=>{
console.log()
})