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

Read lines with JSON object #298

Closed
qqilihq opened this issue Jul 23, 2021 · 2 comments
Closed

Read lines with JSON object #298

qqilihq opened this issue Jul 23, 2021 · 2 comments

Comments

@qqilihq
Copy link

qqilihq commented Jul 23, 2021

I found this posted on HN a while ago and love it -- thank you!

As a minor improvement, it would be great to have the ability to parse a file with line-separated JSON objects. Currently the parser obviously requires an array wrapping all these objects.

@simonw
Copy link
Owner

simonw commented Aug 2, 2021

This is a feature already! You can do this:

sqlite-utils insert nl-demo.db mytable data.ndjson --nl

See https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-newline-delimited-json

@simonw simonw closed this as completed Aug 2, 2021
@qqilihq
Copy link
Author

qqilihq commented Aug 3, 2021

@simonw Awesome; thanks so much!

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

No branches or pull requests

2 participants