Bulk insert records witch batch size #218
hipertracker
started this conversation in
Ideas
Replies: 1 comment
-
You're right, I think the only solution for now would be to split it up manually: rows_to_insert = [Band(name='foo'), Band(name='bar') ...]
index = 0
while True:
rows = rows_to_insert[index: index + 10]
if not rows:
break
else:
index += 10
Band.insert(*rows).run_sync() Having a proper API would be nicer. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Piccolo supports selecting records in the batch but for inserting records it has no option for setting a specific batch size.
Beta Was this translation helpful? Give feedback.
All reactions