-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: Legacy C++ Implementation
-
Component/s: mongoimport
-
None
Reported on GG, attempt to import a file as CSV that has semicolons ( as separators results in successful import of string fields but not number fields.
$ cat /tmp/semis.csv "Position";"Name";"Nation";"house";"loss" 1;"Ada, Alix";"ESP";30;"55%" 2;"Ave, Apsx";"CAN";32;"55%" $ mongoimport -d gg -c semis -type csv --file /tmp/semis.csv --headerline -vvv 2014-05-18T11:52:02.088-0700 creating new connection to:127.0.0.1:27017 2014-05-18T11:52:02.089-0700 [ConnectBG] BackgroundJob starting: ConnectBG 2014-05-18T11:52:02.090-0700 connected to server 127.0.0.1:27017 (127.0.0.1) 2014-05-18T11:52:02.090-0700 connected connection! connected to: 127.0.0.1 2014-05-18T11:52:02.094-0700 ns: gg.semis 2014-05-18T11:52:02.095-0700 filesize: 100 2014-05-18T11:52:02.095-0700 got line:"Position";"Name";"Nation";"house";"loss" 2014-05-18T11:52:02.095-0700 got line:1;"Ada, Alix";"ESP";30;"55%" 2014-05-18T11:52:02.101-0700 got line:2;"Ave, Apsx";"CAN";32;"55%" 2014-05-18T11:52:02.102-0700 imported 2 objects gg@local(2.6.1) > db.semis.find() { "_id" : ObjectId("537901523f026d8c6279e4e4"), "Position" : "Ada, Alix", "Name" : "ESP", "Nation" : "55%" } { "_id" : ObjectId("537901523f026d8c6279e4e5"), "Position" : "Ave, Apsx", "Name" : "CAN", "Nation" : "55%" }