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

Command for outputting a dump as NL objects #7

Closed
simonw opened this issue Aug 15, 2022 · 2 comments
Closed

Command for outputting a dump as NL objects #7

simonw opened this issue Aug 15, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Aug 15, 2022

Rows are currently stored on disk in this format:

[1, "Simon"]
[2, "Cleo"]

You have to consult the accompanying metadata JSON file to find out what the column names are.

A command that streams out one of these dumps as newline separated objects with the column names as keys would be useful.

@simonw simonw added the enhancement New feature or request label Aug 15, 2022
@simonw
Copy link
Owner Author

simonw commented Aug 15, 2022

Potential design:

sqlite-diffable objects data/rows.ndjson

This would look for column info in data/rows.metadata.json.

It would stream newline delimited output to standard out.

-o filename could save to disk instead.

An option to write it out as a JSON array of objects would be useful too - maybe called --array.

@simonw simonw closed this as completed in d8f071b Aug 18, 2022
simonw added a commit that referenced this issue Aug 18, 2022
simonw added a commit that referenced this issue Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant