Summary
======
- mongoimport is creating an extra field (field5) in cases where the last field is numeric AND has more than 15 digits.
- mongoimport does not have this problem if the over-sized field is before the last "column"
Reproduce
======
Run the following on the attached CSV:
mongoimport -d dealerlocator -c dealers --type csv --fields "_id,name,address,latitude,longitude" --drop --file gg.csv
From the attached file, the last document looks like this:
{
"_id" : 52373,
"name" : "GARAGE DU VAL D'ARGENT",
"address" : "1C R MAURICE BURRUS 68160 STE CROIX AUX MINES",
"latitude" : 48.257771809895836,
"longitude" : 7.212600199381513,
"field5" : "333333333\""
}
In the file
- latitude : "48.2577718098958333333333333333333333333"
- longitude : "7.21260019938151333333"
Problem
------
Latitude was correctly trimmed into a numeric.
Longitude was incorrectly "cut".