pymilvus
pymilvus copied to clipboard
[QUESTION]: Does PyMilvus support another way to perform bulk insert without uploading an existing file to MinIO?
Is there an existing issue for this?
- [X] I have searched the existing issues
What is your question?
I just found 'do_bulk_insert' method in utility folder,but it seems to only supprt operation with real files(JSON...)
Does PyMilvus support another way to perform bulk insert without uploading an existing file to MinIO? Is there any ways can do bulk insert? Thank you.
Anything else?
No response
/assign @yhmo
`data = [field_1, field_2, field_3]
batch_size = 10000
for i in range(0, len(data), batch_size):
data_batch = [list(field_1[i:i+batch_size]),list(field_2[i:i+batch_size]), list(field_3[i:i+batch_size])]
collection.insert(data_batch)`
This is how I insert data in bulk. Basically, field 1,2 and 3 are numpy arrays or lists with the data to be inserted. Batch them into 10k slices and insert.