Skip to content

Support for ignoring rows with missing columns without throwing Exception #304

@alexhelder

Description

@alexhelder

According to the documentation CsvSpecs.allowMissingColumns(false) will throw an Exception when a record is encountered with missing Columns. If true, the missing columns are represented as null.

Would it make sense to have some behavior where rows with missing columns are ignored?

My use case specifically, is that I need to fetch small pieces of a very large CSV file over the network using HTTP GET with (byte) range request to binary search for a specific row(s). Since ranges are specified in bytes, it is likely that the first and last line will be malformed (missing columns).

Without this feature, I would have to pre-process the bytes read, count delimiters per line, to drop lines that have the wrong number of delimiters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions