-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
big csv #79
Comments
Hi, var Converter=require("csvtojson").Converter;
var csvConverter=new Converter({constructResult:false}); //important to
turn off result construction
csvConverter.transform=function(json,row,index){
json["rowIndex"]=index;
/* some other examples:
delete json["myfield"]; //remove a field
json["dateOfBirth"]=new Date(json["dateOfBirth"]); // convert a field
type
*/
};
var rs=require("fs").createReadStream("./millionsRows.csv");
rs.pipe(csvConverter)
//.pipe(downstream) ~Keyang On 18 February 2016 at 17:49, suresh varman notifications@github.com
|
thanks for the quick response, previously the transform was not working, so we were using the "end_parsed" we faced a problem while processing the csv file of 125 MB its because we were using the version 0.4.5 now the problem is been resolved by upgrading to newer version. i am closing this thanks again. |
I'm having 1 million records of CSV file, I need to apply some transform on each record, how can I achieve this with read and write stream
The text was updated successfully, but these errors were encountered: