-
Notifications
You must be signed in to change notification settings - Fork 67
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
CSV writer #1237
Comments
I think the CSV writer should handle heterogenous records, though I assume that'd require writing to a temporary file to build the union of all the record types. That may be more than what the community user asked for, if their target was a sql db import. |
@alfred-landrum, agreed. I will write up a new issue for this. There are a couple ways to do it. |
We also need to change the search endpoint with csv output (as part of the larger refactoring there) so the front-end doesn't have to have its own csv writer and record unflattener in javascript. |
This is an auto-generated commit with a zq dependency update. The zq PR brimdata/zed#1267, authored by @mccanne, has been merged. add csv writer Fixes brimdata/zed#1237
Verified in Output as CSV currently works for any data that can be represented by a single "descriptor" (i.e. they all have the same record type). For instance, the contents of a single Zeek log:
It's then trivial to put this output into my paste buffer and, say, enter it into a Google Sheet and select Data > Split Text To Columns. If the data trying to be output requires multiple descriptors, the user will receive an error message and the output will stop when the first record of a different type is encountered. For example, if you try to output two Zeek logs at once via CSV:
However, we do have a plan to address this case as well, and that's tracked in #1271. Finally, I noticed that Thanks @mccanne! |
…by philrz This is an auto-generated commit with a zq dependency update. The zq PR brimdata/zed#1300, authored by @philrz, has been merged. Output format changes: Add "csv", remove "types" While verifying brimdata/zed#1237, I noticed that CSV is not yet listed among the output formats. I wondered if maybe we were intentionally holding off on revealing it until we address brimdata/zed#1271, but it seems useful enough in its present form that I'm proposing here that we reveal it now. I'd also recalled seeing @mccanne mention recently that `types` was removed as an output format. Indeed, as of `zq` commit `4bce00d`: ``` $ zq -version Version: v0.21.0-27-g4bce00d ``` Therefore I'm also taking that out while I'm at it.
A community user asked:
The text was updated successfully, but these errors were encountered: