0

I am trying to import an example json file. The json file is - https://raw.githubusercontent.com/mongodb/docs-assets/primer-dataset/primer-dataset.json, and the command I am using in mongo.exe after started running mongod.exe is -

"mongoimport --db test --collection restaurants --drop --file C:\MongoDB\Server\3.4\binprimer-dataset.json"

1) I tried removing "--drop" option as there were no collections or anything else loaded.

2) I have loaded the file in the same location as of "mongoimport.exe" location, tried with absolute path and still no luck

It is always giving me the same error that - "[thread1] SyntaxError: missing ; before statement @(shell)1:14"

Please help, TIA.

enter image description here

Prashanth kumar
  • 949
  • 3
  • 10
  • 32
  • 1
    Apparently so many people actually do this so it was added to the [manual page](https://docs.mongodb.com/manual/reference/program/mongoimport/) as well *"Run mongoimport from the system command line, **not the mongo shell**."* – Neil Lunn Nov 15 '17 at 10:22
  • Thanks to you, that worked... – Prashanth kumar Nov 15 '17 at 17:53

0 Answers0