Skip to content

Support validating CSV headers against Schema #10143

Description

@XiNiHa

Is your feature request related to a problem or challenge?

Currently, the CSV decoder blindly skips over the header row. However, since we have a schema to parse against, it'd be desirable in some cases to verify the headers against it to ensure the CSV file has the expected structure.

Describe the solution you'd like

Add a new ReaderBuilder method .with_header_validation(bool) to enable CSV header validation, which verifies each value in the first CSV row against the schema to ensure the field names match the header columns.

Describe alternatives you've considered

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelog

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions