When given a csv file (att: recordshelf-genres.csv) and imported via 'mongoimport -d recordshelf -c genres --file recordshelf-genres.csv --drop -f name --type csv --headerline --ignoreBlanks' the imported collection looks (is) incorrect possible due to whitespace issues in the column value 'Drum and Bass'. See next snippet from mongo shell showing the corrupted data.
db.genres.find()
{ "_id" : ObjectId("4b886702982b57076c82e282"), "name" : "Drum and Bass" } { "_id" : ObjectId("4b886702982b57076c82e283"), "name" : "Rap", "field1" : "and Bass\"" } { "_id" : ObjectId("4b886702982b57076c82e284"), "name" : "House", "field1" : "d Bass\"" } { "_id" : ObjectId("4b886702982b57076c82e285"), "name" : "Reggae", "field1" : "Bass\"" } { "_id" : ObjectId("4b886702982b57076c82e286"), "name" : "Dubstep", "field1" : "Bass\"" }When column value 'Drum and Bass' get replaced (att: recordshelf-genres-jazzed.csv) with e.g. Jazz the csv mongoimport (same call as above with modified import csv) works as expected as shown in the next mongo shell excerpt.
db.genres.find()
{ "_id" : ObjectId("4b886860982b57076c82e287"), "name" : "Jazz" } { "_id" : ObjectId("4b886860982b57076c82e288"), "name" : "Rap" } { "_id" : ObjectId("4b886860982b57076c82e289"), "name" : "House" } { "_id" : ObjectId("4b886860982b57076c82e28a"), "name" : "Reggae" } { "_id" : ObjectId("4b886860982b57076c82e28b"), "name" : "Dubstep" }Looks like a bug to me, but maybe I'm just to tired for seeing a trivial solution for this issue or I'm issuing mongoimport in a false way. If that's the case sorry for opening this issue ;D