The process of importing multiple JSON files into MongoDB is something that feels unnecessarily manual. Ideally, MongoDB could provide a GUI-based tool or an automated utility that can batch-import files directly into corresponding collections without having to script it . Do you have any existing utility, that can be used to perform perfom batch imports…? or any plans for future.?
Hi Pavan,
Welcome to the MongoDB forums!
I think you need something like: mongoimport. An example command would be:
mongoimport --uri "mongodb+srv://cluster0.your-cluster-here.mongodb.net/" --username your-user -d harddrives -c hds --drop --stopOnError --jsonArray data/players22.json
Where harddrives
is the database and hds
is the collection where we are importing.
Hope this helps