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

Revisit text mode output #4595

Open
philrz opened this issue May 18, 2023 · 1 comment · Fixed by #5170
Open

Revisit text mode output #4595

philrz opened this issue May 18, 2023 · 1 comment · Fixed by #5170

Comments

@philrz
Copy link
Contributor

philrz commented May 18, 2023

At the time this issue is being filed, Zed is at commit a2626a7.

I sometimes reach for text output mode in the CLI tools such as when grabbing individual values to populate environment variables in my Bash scripts. I recently went to output a time value and was thrown by how it's currently printed as epoch seconds.

$ zq -version
Version: v1.7.0-66-ga2626a7c

$ echo '2023-05-17T17:13:37.711504Z' | zq -f text -
1684343617.711504

The mode has been mostly untouched for years, so this specific example is an artifact of when Zeek-like output seemed like a reasonable default. Things have changed enough that something like undecorated ZSON would probably be more appropriate.

@philrz
Copy link
Contributor Author

philrz commented Aug 19, 2024

A community user recently started making use of -f text, and after seeing their struggles I added some minimal coverage of the format in a new Simplified Text Outputs section of the zq command docs (#5170).

However, even since then, in another community Slack thread a user reported being confused by the \x09 appearing in their output in place of a tab character in their original data. Those of us that are aware of the project's history know this to be a side effect of Zed's Zeek-y roots, but this would be awkward to disclose to a user as if it's a good thing, further making the case that we revisit the format.

I suspect there's some overlap between this and #5042.

@philrz philrz linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant