I am trying to do a bulk update with the following
mongoimport -d my_db -c db_collection -upsertFields email ~/Desktop/update_list.csv
The csv I'm trying to import is as follows.
email, full_name stack@overflow.com ,stackoverflow mongo@db.com ,mongodb
It should check the email column as a request argument and update the full name accordingly. However, none of them were imported; it encountered errors.
exception:Failure parsing JSON string near: abc@sa abc@sasa.com ,abc imported 0 objects encountered 99398 errors
Where is the problem? How am I supposed to do this?
source share