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

improvement: add projections to wt dump utility

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2.8
    • Fix Version/s: WT2.9.1, 3.5.2, 3.2.13, 3.4.3
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: