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

mongoimport splits field on double quotes

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.3.5
    • 1.2.4
    • Tools
    • None
    • os x

    Description

      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" : "--\"" }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: