Docs
Docs /Exploring Results /Export
Exploring ResultsResults

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.

Export Results
Google DriveDownloadBigQueryCloud StorageClipboardDeveloper
CSVExcelJSONMarkdownDuckDB
All rows ▾
Export
Export Results. The tabs remember which one you used last.

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

TabOptionsNotes
Google DriveCreate new spreadsheet · Add to existing spreadsheetUp to 100,000 rows. Needs the Drive scope — Grant Access appears if you haven’t given it
DownloadCSV · Excel · JSON · Markdown · DuckDBJSON needs a query result (not a table export). DuckDB is a .sql file that keeps nested fields
BigQuerySave to TableOpens a new tab with a CREATE TABLE template you run yourself
Cloud StorageCSV · JSON · Parquet · AvroOpens a new tab with an EXPORT DATA statement you run yourself
ClipboardTSV · SlackUp to 1,000 rows. Slack is a padded table in a code block
Developerdbt ModelThe 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:

Export Results
Google DriveDownloadBigQueryCloud StorageClipboardDeveloper

Diesel pass rates
Tab: “Query 1 - Aug 28 14:02” - 3 hours ago

Tab name Query 1 - Aug 28 14:02
UpdateAppend ▾
or
New sheetBrowse Drive
Export
A tab that has exported before. Update overwrites the sheet, Append adds rows below it.

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:

ShortcutAction
GUpdate the previous sheet
AAppend 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

KOpen 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.