{"html_url": "https://github.com/simonw/sqlite-utils/issues/392#issuecomment-1021876914", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/392", "id": 1021876914, "node_id": "IC_kwDOCGYnMM486Jqy", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-26T05:17:49Z", "updated_at": "2022-01-26T05:17:49Z", "author_association": "OWNER", "body": "Relevant code: https://github.com/simonw/sqlite-utils/blob/a9fca7efa4184fbb2a65ca1275c326950ed9d3c1/sqlite_utils/cli.py#L1014-L1018", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114640101, "label": "`sqlite-utils bulk --batch-size` option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/392#issuecomment-1021877058", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/392", "id": 1021877058, "node_id": "IC_kwDOCGYnMM486JtC", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-26T05:18:12Z", "updated_at": "2022-01-26T05:18:18Z", "author_association": "OWNER", "body": "Help for `insert` says:\r\n```\r\n --batch-size INTEGER Commit every X records\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114640101, "label": "`sqlite-utils bulk --batch-size` option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/392#issuecomment-1021877769", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/392", "id": 1021877769, "node_id": "IC_kwDOCGYnMM486J4J", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-26T05:19:48Z", "updated_at": "2022-01-26T05:19:48Z", "author_association": "OWNER", "body": "Can use this utility function: https://github.com/simonw/sqlite-utils/blob/a9fca7efa4184fbb2a65ca1275c326950ed9d3c1/sqlite_utils/utils.py#L322-L325", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114640101, "label": "`sqlite-utils bulk --batch-size` option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/392#issuecomment-1022466476", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/392", "id": 1022466476, "node_id": "IC_kwDOCGYnMM488Zms", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-26T18:17:43Z", "updated_at": "2022-01-26T18:17:43Z", "author_association": "OWNER", "body": "Manually tested it like this:\r\n```\r\n# Create database with an empty \"lines\" table\r\nsqlite-utils create-table bulk-test.db lines line text\r\n# Stream records every 0.5s, commit every 5 records\r\nstream-delay docs/python-api.rst -d 500 | \\\r\n sqlite-utils bulk bulk-test.db 'insert into lines (line) values (:line)' - \\\r\n --lines --batch-size 5\r\n```\r\nRunning `datasette bulk-test.db` showed that records would show up about every 2.5s five at a time.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114640101, "label": "`sqlite-utils bulk --batch-size` option"}, "performed_via_github_app": null}