Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1727

mongoexport and specific fields export with an alias name

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      I am trying to export certain fields from a collection using mongoexport command, by defining the fields in an external file. Is there a possible way to define an alias for each of the field. Example:

      { "id":1, "words":["data","base"] }

      My file would be as:

      id
      words.0
      words.1

      Which leads to a csv header as :

      id, words.0, words.1

      Instead, I require aliases to each of these transformed columns as:

      id, first_word, second_word

      In reference with : https://stackoverflow.com/questions/45104075/mongoexport-and-specific-fields-export-with-an-alias-name?noredirect=1#comment77181177_45104075

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            sathyasarathi Sathiya Sarathi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: