Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2971

mongoimport + oversize numbers => garbage field

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.0.0
    • Affects Version/s: 1.8.1
    • Component/s: Tools
    • None
    • Environment:
      Windows
    • Windows

      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".

        1. gg.csv
          0.5 kB
          Gaetan Voyer-Perrault

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            gatesvp Gaetan Voyer-Perrault
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: