Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
From my own trial and error the solution was to temporarily increase the Read Units Per Second for the MongoDB. Then it worked flawlessly the first time to import.
Answer
#3: Post edited
From my own trial and error the solution was to temporarily increase the Read Units Per Second for the MongoDB. Then it worked flawlessly the first time to import.And also later I've increased Read Units per second and I've used MongoDB Compass for data migration and it worked very good also. MongoDB Compass migration guide:To use and connect with MongoDB Compass, please look herehttps://www.mongodb.com/products/tools/compasshttps://www.mongodb.com/docs/compass/current/connect/MongoDB Compass, Export DataInside MongoDB CompassClick on the source collection, for example database <your source database>, collection <your collection>EXPORT DATAExport the full collectionJSONExport...In your Downloads folder or another temporary folder, save the fileIncrease RU/s for MongoDBLog in to Azure PortalFind and click on <your cosmos db>Data Explorer<your target database>ScaleManual10000SaveMongoDB Compass, Import DataInside MongoDB CompassClick on the target collection, for example database <your target database>, collection <your collection>ADD DATAImport JSON or CSV fileIn Downloads folder or another temporary folder, Select your exported fileStop on errors: TrueImportDecrease RU/s for MongoDBLog in to Azure PortalFind and click on <your cosmos db>Data Explorer<your target database>ScaleManual400SaveDelete Data FileIn Downloads folder or another temporary folder, Delete your exported file
- From my own trial and error the solution was to temporarily increase the Read Units Per Second for the MongoDB. Then it worked flawlessly the first time to import.
#2: Post edited
From my own trial and error the solution was to temporarily increase the Read Units Per Second for the MongoDB. Then it worked flawlessly to import.
- From my own trial and error the solution was to temporarily increase the Read Units Per Second for the MongoDB. Then it worked flawlessly the first time to import.
- And also later I've increased Read Units per second and I've used MongoDB Compass for data migration and it worked very good also. MongoDB Compass migration guide:
- To use and connect with MongoDB Compass, please look here
- https://www.mongodb.com/products/tools/compass
- https://www.mongodb.com/docs/compass/current/connect/
- MongoDB Compass, Export Data
- Inside MongoDB Compass
- Click on the source collection, for example database <your source database>, collection <your collection>
- EXPORT DATA
- Export the full collection
- JSON
- Export...
- In your Downloads folder or another temporary folder, save the file
- Increase RU/s for MongoDB
- Log in to Azure Portal
- Find and click on <your cosmos db>
- Data Explorer
- <your target database>
- Scale
- Manual
- 10000
- Save
- MongoDB Compass, Import Data
- Inside MongoDB Compass
- Click on the target collection, for example database <your target database>, collection <your collection>
- ADD DATA
- Import JSON or CSV file
- In Downloads folder or another temporary folder, Select your exported file
- Stop on errors: True
- Import
- Decrease RU/s for MongoDB
- Log in to Azure Portal
- Find and click on <your cosmos db>
- Data Explorer
- <your target database>
- Scale
- Manual
- 400
- Save
- Delete Data File
- In Downloads folder or another temporary folder, Delete your exported file