Saturday, December 17, 2016

Import Json DataSet file into MongoDB or Import Json file into MongoDB Collection

In the previous Posts we had shown
and now we are going to show How to Import Json Data into MongoDB collection.


  1. First go to MongoDB website to download/save sample file from HERE.
  2. Downloaded file path on Desktop is C:\Users\Admin\Desktop\primer-dataset.json
  3. Open command prompt and go to MongoDB installed path.
  4. In my system its C:\MongoDB
  5. Copy Paste the below command as shown below
    mongoimport --db test --collection restaurants --drop --file C:\Users\Admin\Desktop\primer-dataset.json
  7. And the entire command looks as shown below
    C:\MongoDB\mongoimport --db test --collection restaurants --drop --file C:\Users\Admin\Desktop\primer-dataset.json

No comments:

Post a Comment