manojkarthick / pqrs

Command line tool for inspecting Parquet files
Apache License 2.0
283 stars 27 forks source link

Add --nested-fields={error,omit,json} for CSV #55

Open ttencate opened 1 month ago

ttencate commented 1 month ago

These apply to both cat and head subcommands, and specify how to handle nested fields if the output format is CSV (which does not support nested fields). The default, --nested-fields=error, just exits with a helpful error message.

This also changes the printing of errors escaping from the main() function to use Display, rather than Debug, in order to make them more user-friendly:

Columns encountered with nested field types, which are not supported in CSV: ["country"]
Hint: Use `--nested-fields=omit` to omit them, or `--nested-fields=json` to encode them as JSON.

Fixes #54.