Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

I'm using python + MongoDB with pymongo so far everything is fine

But now I want to optimize the inserts, what I do is read with CDs with 50000 rows and I create a loop to read the row of a row, passing a json and perform insertion (insert), it takes a lot but XD

Problems now I have about 200 csv files that have between 50000 and 150000 rows and it already becomes unsustainable

I wanted to know if there is any way to do bulk inserts in MongoDB

Example in Postgress is the copy instruction, which uploads a complete file to the bd

Thanks in advance, regards

Translated by google translate, to English.

1 Answer

0 votes
by (106k points)

Yes, You can have a look at this website here. Depending on the format you can use mongoimport directly.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers
asked Oct 16, 2019 in Web Technology by Sammy (47.6k points)

Browse Categories

...