sqlite-utils insert ... --nl option, closes #6

This commit is contained in:
Simon Willison 2019-01-27 18:17:38 -08:00
commit 5309c5c775
3 changed files with 29 additions and 7 deletions

View file

@ -123,6 +123,11 @@ You can import all three records into an automatically created ``dogs`` table an
$ sqlite-utils insert dogs.db dogs dogs.json --pk=id
You can also import newline-delimited JSON using the ``--nl`` option. Since [Datasette](https://datasette.readthedocs.io/) can export newline-delimited JSON, you can combine the two tools like so::
$ curl -L "https://latest.datasette.io/fixtures/facetable.json?_shape=array&_nl=on" \
| sqlite-utils insert nl-demo.db facetable - --pk=id --nl
Upserting data
==============