Reputation: 25
I wanted to import data to my collection in mongodb atlas, and I was following the documentation: https://docs.mongodb.com/compass/beta/import-export/ but there is no "ADD DATA" and I don't know if Im using some other version or Im doing something else wrongly. I need to import whole file which is json array.
Upvotes: 1
Views: 2505
Reputation: 1260
The docs you referenced are for a future version of Compass. If you want to import from EJSON at the command line you can use mongoimport
.
Here's the simplest syntax, but there are many variations possible.
mongoimport --db=users --collection=contacts --file=contacts.json
Upvotes: 3