I am trying to import JSON file of 1.1GB into MongoDB using the command:
mongoimport -d sis -c Final --file C:\Users\lenovo-pc\Desktop\Final.json\Final.json
After successful insertion of the documents, suddenly an error popped up on the screen:
2017-01-25T21:31:00.746+0530 Failed: error processing document #795796: unexpected EOF
2017-01-25T21:31:00.749+0530 imported 795795 documents
I do not know why it is showing 148MB only while importing, where as I have 1.1GB of records available. Still I have many records to be inserted. But MongoDb is failing to import. Why is this happening? How can I avoid this mishap situation?
Try removing one \Final.json
mongoimport -d sis -c Final --file C:\Users\lenovo-pc\Desktop\Final.json\Final.json
to
mongoimport -d sis -c Final --file C:\Users\lenovo-pc\Desktop\Final.json