Export
Send a result set, or a whole table, to Google Sheets, a file on disk, the clipboard, a BigQuery table, or Cloud Storage. One dialog, opened from the grid footer, with the row count chosen at the bottom.
Opening it
Click Export (the tray icon) at the right of the results footer. On a narrow panel it moves into the More options menu. Right-clicking a table in the schema tree and choosing Export opens the same dialog for the whole table; rows are fetched when you confirm.
⌘⇧X in the editor (the command is called Export to Google Sheets…) opens the same dialog. If you haven’t granted Google Drive access yet, that press starts the consent flow instead; press it again afterwards.
There is no Cancel button — Esc or a click outside closes it.
Destinations
| Tab | Options | Notes |
|---|---|---|
| Google Drive | Create new spreadsheet · Add to existing spreadsheet | Up to 100,000 rows. Needs the Drive scope — Grant Access appears if you haven’t given it |
| Download | CSV · Excel · JSON · Markdown · DuckDB | JSON needs a query result (not a table export). DuckDB is a .sql file that keeps nested fields |
| BigQuery | Save to Table | Opens a new tab with a CREATE TABLE template you run yourself |
| Cloud Storage | CSV · JSON · Parquet · Avro | Opens a new tab with an EXPORT DATA statement you run yourself |
| Clipboard | TSV · Slack | Up to 1,000 rows. Slack is a padded table in a code block |
| Developer | dbt Model | The same generator as the dbt panel’s Export dbt Model |
Google Sheets
On the first export from a tab, pick Create new spreadsheet (name defaults to the tab name plus a timestamp) or Add to existing spreadsheet and browse Drive. The export runs in the background; the notification links to the sheet and offers Open in App, which loads it in a Querylab.io tab.
After that, the dialog remembers the destination and shows it first:
Diesel pass rates
Tab: “Query 1 - Aug 28 14:02” - 3 hours ago
Append has two flavours: Append with header and Append data only. If the named tab doesn’t exist in the spreadsheet yet, either action creates it.
Two shortcuts repeat the last export of the tab without the dialog, sending the current grid page:
| Shortcut | Action |
|---|---|
| ⌘⇧G | Update the previous sheet |
| ⌘⇧A | Append to the previous sheet |
They are editor actions, so the SQL editor must have focus, and they need a previous export on that tab — otherwise you get No previous export.
Choosing how many rows
The text at the bottom-left (All rows, or 1,000 / 48,213) is a menu:
- Page (N) — the rows on the current grid page. Absent for table exports.
- 1,000, 10,000, 100,000 — each offered only if the result has that many.
- 500,000 — for downloads in Chrome and Edge, which stream straight to disk.
- All (N) or Max (N) — everything, or the destination’s cap.
- Custom… — type a number.
Caps: 100,000 rows for Google Sheets and for downloads in browsers without streaming; 1,000 for the clipboard; none for the BigQuery and Cloud Storage tabs, which hide the selector because they generate SQL instead of moving rows.
Copy without the dialog
The grid footer’s Copy button copies the visible page as tab-separated text, and the command palette (⌘K) has Copy results as image, which captures the rows currently on screen. See Results grid.
Opening a sheet in the app
⌘K → Open Google Sheet browses Drive and loads a spreadsheet in a tab; Create New Google Sheet makes a blank one. The tab embeds Google’s own editor, so what you can edit there is what Google lets you edit.