mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
sqlite-utils bulk --batch-size option, closes #392
This commit is contained in:
parent
a9fca7efa4
commit
d1d2a8e6fa
4 changed files with 54 additions and 4 deletions
|
|
@ -309,6 +309,7 @@ See :ref:`cli_bulk`.
|
|||
' -
|
||||
|
||||
Options:
|
||||
--batch-size INTEGER Commit every X records
|
||||
--flatten Flatten nested JSON objects, so {"a": {"b": 1}} becomes
|
||||
{"a_b": 1}
|
||||
--nl Expect newline-delimited JSON
|
||||
|
|
|
|||
|
|
@ -1120,6 +1120,8 @@ You could insert those rows into a pre-created ``chickens`` table like so::
|
|||
|
||||
This command takes the same options as the ``sqlite-utils insert`` command - so it defaults to expecting JSON but can accept other formats using ``--csv`` or ``--tsv`` or ``--nl`` or other options described above.
|
||||
|
||||
By default all of the SQL queries will be executed in a single transaction. To commit every 20 records, use ``--batch-size 20``.
|
||||
|
||||
.. _cli_insert_files:
|
||||
|
||||
Inserting data from files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue