Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Transform stream does not read all the records . #31

Open
swarnim1996 opened this issue Oct 2, 2020 · 1 comment
Open

Transform stream does not read all the records . #31

swarnim1996 opened this issue Oct 2, 2020 · 1 comment

Comments

@swarnim1996
Copy link

I am transform stream

It suddenly stops printing the record at around record number 478 .

Finish or end event is also not triggered nothing happens this is very weird!!!

 let updateRecordsWithStatus = transform(async (record, callback) => {
            console.log('rec'+ JSON.stringify(record))
            record.ENTITY_OPERATION_STATUS = 'SUCCESS';
            errorMap = await this.getBatchErrorMap(batch);
            recordCount++;
            callback(null, record);
        }, {
            parallel: 0
        });

 inputFileStream.pipe(csvParser).pipe(updateRecordsWithStatus).pipe(outputFileStream);
@wdavidw
Copy link
Member

wdavidw commented Oct 5, 2020

Your have an await statement inside a function expecting a callback, this is not right. Note, I am not sure this cause any problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants