RED Docs

Exporting data

Get query results, Redis keys, and whole tables out of RED.

RED can export the data you're looking at so you can hand it off, diff it, or load it elsewhere. Every format is streamed row by row, so an export is not limited to what's on screen and never materializes the result in memory.

Copy from the grid

For a quick grab, select a range in the result grid and press ⌘CCtrl+C to copy it as TSV - ready to paste into a spreadsheet.

The cell menu's "Copy as" offers more shapes: TSV with headers, CSV, JSON, a Markdown table, an IN (…) list, or one INSERT per row on a table browse.

Export a result set

Use the export action from the result toolbar or the command palette (⌘KCtrl+K) and pick a format:

FormatNotes
CSVThe interchange default
JSONOne array of objects
SQLA stream of INSERT INTO … VALUES (…);, one per row. The table name comes from the file you save to; identifiers and literals use portable ANSI quoting
Excel (.xlsx)One sheet. Numbers stay numbers and numeric-looking strings stay strings. Stops at Excel's 1,048,576-row limit and reports the truncation rather than dropping rows silently
HTMLA themed, self-contained report (inline CSS, light/dark via prefers-color-scheme) opened in your browser - a document to read, not a data file

Redis keys

The Redis shell exports keys in three formats, scoped to the visible keys, the current filter, or the whole database:

FormatNotes
Commands (.redis)redis-cli-style commands - readable, cross-version, and re-importable
JSONOne object per key. Does not round-trip: binary values are marked, not carried
DUMP (.rdbdump)A framed DUMP payload per key. Byte-exact and the only format carrying binary values, but not cross-version - RESTORE refuses a newer RDB version

Exports stream, cancel cleanly, write expiry as absolute deadlines, and report values a text format cannot carry. See Redis.

Import

The reverse paths exist too: a .csv, newline-delimited JSON, or a .json file holding a single top-level array of objects can be imported into a table, and a .redis / .rdbdump file into a Redis database.

Into another database

Populating another database rather than a file? Two routes, neither writing an intermediate dump:

  • Copy to… in the app - streams a table straight into another connection, same engine or across engines.
  • red copy / red migrate - the same thing headless, for CI and seeding scripts.

The AI assistant can also hand you a file - a query result, a set of Redis keys, or a collection, as CSV or JSON, offered as a card in the chat.

On this page