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

mongoimport splits field on double quotes

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.5
    • Affects Version/s: 1.2.4
    • Component/s: Tools
    • None
    • Environment:
      os x

      In 1.2.4 as well as the 3/17/2010 nightly, importing a csv file, I am unable to use mongoimport to import any field that contains double quotes. I've tried a few different escaping methods (see attached csv), but importing results in these records:

      > db.testcsv.find()

      { "_id" : ObjectId("4ba0ea9c092e8e7a4692ce3c"), "namedfield" : "Here is a quote 1 -->", "field1" : "<--\"" } { "_id" : ObjectId("4ba0ea9c092e8e7a4692ce3d"), "namedfield" : "Here is a quote 2 -->\", "field1" : "--\"" } { "_id" : ObjectId("4ba0ea9c092e8e7a4692ce3e"), "namedfield" : "Here is a quote 3 -->\\", "field1" : "--\"" }

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            yacomink Andy Yaco-Mink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: