I'm trying to update 12,000 records with specific values. The values a different per document in mongo so i figured mongoimport could be used. I have a csv file that contains all correct values to be updated in the system.
When i run the mongoimport via cmd line it imports the document but creates a new one instead of updating the existing document.
mongoimport --host xx.xxx.x.xxxx --port 27017 -d test -c test --type csv --headerline --file budgettest1.csv --upsert -vvvv
I've also tried the following to:
mongoimport --host xx.xxx.x.xxxx --port 27017 -d test -c test --type csv --headerline --file budgettest1.csv -vvvv --upsert --upsertFields customer,item,fiscalYear,fiscalMonth,weekID,regularSellingPrice,currentYearPlannedUnits,currentYearPlannedDollars
Iv'e used the _id field as a reference and also left it out and in all cases it just creates a new record. Any info would be greatly appreciated.