Skip to content

Question: Is it possible to return raw record even for error rows in csv-parse? #292

@hemanthreddyk

Description

@hemanthreddyk

Usecase
We want to collect raw record and error reason for all the error rows and form a new CSV file out of it.
By giving this CSV file to the end user they can refer the error message and correct the rows and re-upload the same file.

Whats possible today?
'skip_lines_with_error: true' -- we are able to gather the row numbers of all the faulty records.
'raw: true' -- gives raw record only for valid rows

Current implementation emits a 'skip' event as soon as it finds an error.
Is it possible to wait for the iterator to reach the end of the row and emit the event along with raw record?
@wdavidw Do you see any other way to achieve this use-case with the current implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions