You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The issue occurs when parsing from multiple streams and writing to a single stream.
The first line from the second stream is appended to some line from the first stream but should be put in a new line.
Sometimes it's appended in a new line but mostly not.
When I use csv-stringify to format stream then it works well, everything is in a new line
I read streams simultaneously then problem occurs, when I do it one by one then it works
To demonstrate the issue I've created in /temp-files two csv-s 'file1.csv' and file2.csv.
Formatting is done in two methods transformStreamFastCSV- problematic and transformStreamAndFormatStringify - working.
Results are merged into two files temp-files/merge-fast-csv.csv and temp-files/merge-stringify.csv.
Expected behavior
Fast csv creates 1 row that has no newline and record 100,Riannon... is mostly appended to some line: 199,Britte,Stacy,Britte.Stacy@yopmail.com,dummyBritte.Stacy@gmail.com,worker,file-0100,Riannon,Gino,Riannon.Gino@yopmail.com,dummyRiannon.Gino@gmail.com,doctor,file-1
but should be placed in new line like result from csv-stringify 199,Britte,Stacy,Britte.Stacy@yopmail.com,dummyBritte.Stacy@gmail.com,worker,file-0 100,Riannon,Gino,Riannon.Gino@yopmail.com,dummyRiannon.Gino@gmail.com,doctor,file-1
Screenshots
Desktop (please complete the following information):
Node Version 18.19.0 and in codesandbox 20.something
The text was updated successfully, but these errors were encountered:
Describe the bug
The issue occurs when parsing from multiple streams and writing to a single stream.
The first line from the second stream is appended to some line from the first stream but should be put in a new line.
Sometimes it's appended in a new line but mostly not.
When I use csv-stringify to format stream then it works well, everything is in a new line
I read streams simultaneously then problem occurs, when I do it one by one then it works
Parsing or Formatting?
To Reproduce
Full code in the sandbox. Code is in
src/my-processor.js
https://codesandbox.io/p/sandbox/streams-merge-ldw56f
To demonstrate the issue I've created in
/temp-files
two csv-s 'file1.csv' andfile2.csv
.Formatting is done in two methods
transformStreamFastCSV
- problematic andtransformStreamAndFormatStringify
- working.Results are merged into two files
temp-files/merge-fast-csv.csv
andtemp-files/merge-stringify.csv
.Short version (more like pseudocode):
Expected behavior
Fast csv creates 1 row that has no newline and record
100,Riannon...
is mostly appended to some line:199,Britte,Stacy,Britte.Stacy@yopmail.com,dummyBritte.Stacy@gmail.com,worker,file-0100,Riannon,Gino,Riannon.Gino@yopmail.com,dummyRiannon.Gino@gmail.com,doctor,file-1
but should be placed in new line like result from csv-stringify
199,Britte,Stacy,Britte.Stacy@yopmail.com,dummyBritte.Stacy@gmail.com,worker,file-0 100,Riannon,Gino,Riannon.Gino@yopmail.com,dummyRiannon.Gino@gmail.com,doctor,file-1
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: