- How to Install MongoDB in Windows
- How to Run MongoDB as Windows service
- How to check MongoDB is running or not
- First go to MongoDB website to download/save sample file from HERE.
- Downloaded file path on Desktop is C:\Users\Admin\Desktop\primer-dataset.json
- Open command prompt and go to MongoDB installed path.
- In my system its C:\MongoDB
- Copy Paste the below command as shown below
mongoimport --db test --collection restaurants --drop --file C:\Users\Admin\Desktop\primer-dataset.json
- And the entire command looks as shown below
C:\MongoDB\mongoimport --db test --collection restaurants --drop --file C:\Users\Admin\Desktop\primer-dataset.json