Skip to content
In this guide

Guide · Doing

Export

Read this when rows need to leave Seqora: for a spreadsheet, a fixture file, a pull request or a message to a colleague. It lists what exists, and near the end what doesn't, so you don't go looking for it.

From a query result

  1. Run the query. With several result sets, pick one in the Result set group.
  2. Open the grid's more menu and click Export rows….
  3. The Export rows panel says what it has: 10,000 loaded rows, or 312 of 10,000 loaded rows, filtered when the grid filter is on.
  4. Under Save as, click CSV, JSON or SQL INSERT statements, and choose where to save.

The panel reports "Exported 10,000 rows to orders.csv." The word that matters is loaded. Seqora exports the rows it holds, which is at most Rows kept per result, and the banner over a cut result already told you how many more there were. Nothing is re-run.

CSV writes NULL as \N. JSON keeps numbers exactly as the server sent them, so a numeric or bigint doesn't lose digits, and duplicate column names get numbered suffixes.

From a table tab

  1. Open commerce.orders.
  2. Type a filter into Filter rows, for example total_cents >= 100000.
  3. Open the toolbar's more menu and click Export rows….
  4. Under Rows, choose All matching rows (All rows when no filter is on) or Loaded matching rows. Each shows its count.
  5. Under Save as, click CSV, JSON or SQL INSERT statements.

All rows and All matching rows read the whole table page by page, with your filter and sort applied. It is the one export that goes past the rows Seqora has already loaded. SQL INSERT statements writes INSERT INTO commerce.orders ..., one per row.

The panel lists what the file will and won't hold: Only rows matching the filter, and 9 of 12 columns, in grid order; 3 hidden columns are left out. Hide a column before you export and it stays out of the file.

The same Export rows… item is in a query result's more menu, where it exports the loaded rows and names the table query_result in the INSERTs.

To the clipboard

  1. Select the rows or cells.
  2. Open Copy as… from the grid's more menu or the row's right-click menu.
  3. Pick TSV, CSV, JSON, Markdown, SQL values or INSERT statements.

Headers adds the column names. NULL chooses whether a null is copied as NULL or Empty. Plain ⌘C or Ctrl+C copies in the format set in Settings › Data Grid › Copy rows as, with Include column headers and Copy NULL as beside it. A single cell is copied as it is. In Tab-separated, a value holding a tab or a line break is quoted, so it lands in one spreadsheet cell. Markdown is the one to paste into a pull request.

The ER diagram

  1. Open the diagram with ⇧⌘E or Ctrl+Shift+E.
  2. Click Export in its toolbar. Export diagram opens on what the canvas showed, with a frame around it.
  3. Choose a Format: PNG, SVG or Mermaid.
  4. Drag the frame's handles until it holds the tables you want. Its tab shows the image size.
  5. Click Save…, or Copy.

The preview pans and zooms like the canvas. Zooming it doesn't change the image. Drag the frame's tab to move it, or Shift-drag anywhere to draw a new one. Fit frame, Everything and Canvas view in the toolbar under the preview reset the view or the frame. A table that only partly fits is cut at the frame's edge, and its lines run to the edge.

Click a table in the preview to leave it out of the image. Show all brings them back. Tables narrows the export to Selection, the selected table and the tables it links to.

Columns is As on canvas by default: the image has the same columns and positions as the canvas, moved tables included. Keys only and All columns lay the tables out afresh. For PNG and SVG you also get Theme, Aspect from Free to A4 portrait, Padding, and Include with Transparent, Legend and Name & date. PNG adds Size: 1× to 4× scale, or a width such as 1,920 px. Mermaid lists the tables inside the frame, has a Markdown fence toggle, and pasted into a GitHub or GitLab pull request it renders as a diagram. ⇧⌘C or Ctrl+Shift+C copies what the canvas shows as an image without opening the dialog.

Diagram export is Free on every engine.

A schema design

In Design a schema change, Copy SQL in the SQL pane copies the script at any point. After an apply, Save as .sql writes it to your SQL folder. The design's Export adds a Show choice of Changes, After or Before, Changes under Tables, and for Mermaid a PR summary: "The diagram, the list of changes, and the SQL".

What is not there

  • No full export of a query result. You get the loaded rows and no more.
  • No XLSX. Excel and Numbers open the CSV.
  • No Markdown file. Markdown is a clipboard format only.

For a result bigger than the cap, raise Rows kept per result to 100,000 in Settings › Connections and Safety, and run it again. Past that, let the server write the file. From the terminal, which Ctrl+` opens:

psql "$DATABASE_URL" -c "\copy (SELECT * FROM commerce.orders WHERE placed_at >= now() - interval '30 days') TO 'orders.csv' WITH (FORMAT csv, HEADER)"

\copy runs on your machine and needs no server file privileges. COPY ... TO '/path' in the editor writes on the database server's disk instead, and Seqora asks before it runs.

Caveats

  • PostgreSQL's COPY ... WITH (FORMAT csv) reads an empty field as NULL, not \N. Load a Seqora CSV with NULL '\N'. MySQL's LOAD DATA reads \N as NULL already.
  • A spreadsheet shows \N as text. Copy with Copy NULL as set to Empty if that matters.
  • All rows and All matching rows fetch page after page as separate queries. A table with a key, or a keyless one up to 100,000 rows, is paged in a stable order. A larger keyless table is read in the server's scan order, and the panel warns that the file can repeat or miss rows if that order changes during the export.
  • A result with values the run could not read refuses to export: "3 values could not be read, so the export would write placeholders instead of data. Hide that column or re-run the query." Hide the column and the rest exports.

Last checked against Seqora 0.3.2, PostgreSQL 17 on .

Found a bug, missing a feature, or just curious? Write to me. Every email lands in my own inbox, not a ticket queue.