Uploaded image for project: 'MongoDB Command Line Tools'
  1. MongoDB Command Line Tools
  2. TOOLS-794

Mongoexport will not export field from subdoc to csv

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.0.4
    • Fix Version/s: None
    • Component/s: mongoexport
    • Labels:
      None
    • Environment:
      OSX 10.10

      Description

      Referencing a field in a subdocument appears to be broken in version 3.0.4 of mongoexport.
      In previous versions -f subdoc.0.fieldname would export the values in the first element of subdoc. This is no longer working since I updated to 3.0.4 from 2.6.4. The following is from the docs and it states that the field can be within a subdocument.

      --fields <field1 [,field2]>, -f <field1 [,field2]>
      Specifies a field or fields to include in the export. Use a comma separated list of fields to specify multiple fields.

      For csv output formats, mongoexport includes only the specified field(s), and the specified field(s) can be a field within a sub-document.

        Attachments

          Activity

            People

            • Assignee:
              mpobrien Michael O'Brien
              Reporter:
              steve.schlotter Steve Schlotter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: