Preview

wrgl preview

Shows a commit's content in an interactive table.

wrgl preview { COMMIT_HASH | BRANCH | FILE_NAME } [flags]

To output to a CSV file, use command wrgl export instead.

Flags

--delimiter

CSV delimiter to use when preview target is a file. Defaults to comma.

-h, --help

help for preview

-p, --primary-key

field names to be used as primary key (only applicable if preview target is a file)

--txid

preview commit with specified transaction id. COMMIT must be a branch name.

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--heapprofile

write heap profile to file

--log-file

output logs to specified file

--log-verbosity

log verbosity. Higher value means more log

--no-progress

don't display progress bar

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# preview the head commit of a branch
wrgl preview my-branch

# preview an arbitrary commit by specifying the full sum
wrgl preview 1a2ed6248c7243cdaaecb98ac12213a7

# preview a file. Only works if the entire fit in memory
wrgl preview data.csv

Preview tool

When you run wrgl preview, the commit's content is displayed with the preview tool.

Preview tool

Preview tool

UI elements

From top to bottom:

  • Commit sum and table dimensions
  • The preview table
  • Keyboard shortcuts

Interactions

You can select and scroll with mouse/trackpad. The following keyboard shortcuts are also provided:

  • arrow keys: Navigate inside the preview table.
  • g: Scroll to begin of table.
  • Shift+g: Scroll to end of table.
  • h: Navigate left one cell.
  • j: Navigate down one cell.
  • k: Navigate up one cell.
  • l: Navigate right one cell.