mongoDB compass: CSV Upload (without ID)

162 views
Skip to first unread message

Mario Mueller

unread,
Sep 21, 2018, 8:51:21 AM9/21/18
to mongodb-user
Hi all,

when I create manually a new document in a collection by pressing "insert document" button the ID gets generated automaticaly



Capture.JPG



We want to upload CSV files. As the ID should ID get autogenerated I did not fill the column "ID" in the CSV file.
But when I upload nothing happens.
How can I achieve a CSV-upload with generating IDs?
Regards Mario

Wan Bachtiar

unread,
Sep 25, 2018, 7:55:26 PM9/25/18
to mongodb-user

How can I achieve a CSV-upload with generating IDs?

Hi Mario,

The _id should also automatically be generated when uploading CSV format data from MongoDB Compass.
See also MongoDB Compass: Import Data into a Collection

But when I upload nothing happens.

Could you provide the following information:

  • MongoDB Compass version and edition
  • Example CSV file (few lines)
  • Any messages (i.e. warnings or errors) from Compass

Does the user that you’re using to connect have the write permission into the collection ?

Regards,
Wan.

Reply all
Reply to author
Forward
0 new messages