Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2833

improvement: add projections to wt dump utility

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.1, 3.2.13, 3.4.3, 3.5.2
    • Affects Version/s: 3.2.8
    • Component/s: None
    • None

      I'd like to do something like this:
      wt dump -j 'table:employee(id,department)'

      when I try it I get
      wt: table:employee(id,department): No such object exists.

      A simple use case (especially with -j, or JSON output) is to edit out some fields. In these cases, one could use a JSON stream editor, like jq to edit the output. Another use (without -j) might be to reorganize a table, where it is reloaded into a new schema. Again, with JSON output and jq, one could consider doing this (using wt load -j). But another use case that cannot be solved with JSON stream editors is when dumping an index, and wishing to also see the primary key. For example,
      wt dump -j 'index:employee:department(id,salary)'

      could be a way to see the primary key "id" ordered by the index.

      One consideration would be to adjust the metadata output for the table/index to indicate the new values of columns and value_format.

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: