Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting the header for csv, tsv, and ssv manually #3778

Merged
merged 2 commits into from Jan 9, 2024

Conversation

dominiklohmann
Copy link
Member

This adds a new --header <header> option to the xsv parser, and by extension the csv, tsv, and ssv parsers. When set, the new option effectively adds a line at the top of the input. This is useful when parsing values from a file without a header, which is quite the common occurrence.

@dominiklohmann dominiklohmann added format Parser and printer improvement An incremental enhancement of an existing feature labels Jan 8, 2024
This adds a new `--header <header>` option to the `xsv` parser, and by
extension the `csv`, `tsv`, and `ssv` parsers. When set, the new option
effectively adds a line at the top of the input. This is useful when
parsing values from a file without a header, which is quite the common
occurrence.
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature!

web/docs/formats/xsv.md Outdated Show resolved Hide resolved
web/docs/formats/xsv.md Outdated Show resolved Hide resolved
libtenzir/builtins/formats/xsv.cpp Show resolved Hide resolved
Co-authored-by: Matthias Vallentin <matthias@vallentin.net>
@dominiklohmann dominiklohmann merged commit b577669 into main Jan 9, 2024
46 checks passed
@dominiklohmann dominiklohmann deleted the topic/xsv-parser-header branch January 9, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format Parser and printer improvement An incremental enhancement of an existing feature
Projects
None yet
2 participants