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

add ability to sort and manipulate mongoexport output

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongoexport
    • None
    • Platforms 2017-03-27

      1) Have ability to sort the documents in the output of mongoexport by an arbitrary attribute (or set of attributes) within the documents, and not just by _id (assuming a query filter wasn't used, in which case the output will be sorted however the index sorted it, and forcetablescan which will sort it according to order on disk).

      2) Within each document, have the ability to set the order of the attributes returned (by sorting or other means). Currently, depending on how two different collections may have been built, the attributes for document D123 might come back in order A1, A2, A3, or A3, A1, A2, and it is hard to do a simplistic shell-level comparison for them.

      3) Be able to suppress a particular field from mongoexport output, rather than including only certain pre-known fields. mongoexport has the --fields option, to select only certain fields, but we could add something to include everything in the documents EXCEPT the _id, which will be known to be different between two different collections in an environment.

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            barrie Barrie Segal
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: