Labels

Thursday, 7 January 2016

MongoDB : How to import JSON Records to MongoDB in windows environment


We can import JSON , CSV and TSV files into MongoDB  by using mongoimport utility.

Importing JSON records to MongoDB with mongoimport.exe utility

Step  1:

 MongoDB provided mongoimport.exe utility to import JSON documents from outside environment to MongoDB

Step 2: Make sure MongoD server is running before you start importing JSON documents

Step 3 : Connect to command prompt and execute as mentioned below

Syntax :

Mongodimport.exe path -d <database name> -c <Collection Name > space JSON document path location

Ex : I have installed mongodb in  C:\Program Files\MongoDB\Server\3.2\bin and my JSON files are located in C:\Users\snreddy\Desktop\ImportJSONFiles

Referenced screen shot is mentioned below













Now connect to mongo shell and verify the above kingsrestaurent is created or not ?













Points to Remember :

We cannot import JSON or BSON documents in Mongo Shell .

1 comment:

  1. Take care of Problem in Importing MongoDB Database with MongoDB Technical Support
    On the off chance that you discover any issue with respect to MongoDB like, not ready to import MongoDB database at that point attempt beneath recorded strides to unravel your bringing in issue. Initially you need to check how vast the accumulation is then check do both the servers have same measure of physical memory or not. Subsequent to attempting these means if as yet confronting a similar issue at that point contact to MongoDB Online Support or MongoDB Customer Support USA.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete