Skip to content

Conversation

@ttencate
Copy link

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.

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for nested fields in CSV by encoding them as JSON

1 participant