Export SQL Results to Google Sheets
Last updated May 19, 2026 · By the SaturnSQL team
Google Sheets is the most common destination for SaturnSQL query results. This guide walks through connecting your Google account, picking a destination tab and start cell, setting a refresh cadence, and dealing with the few things that break this workflow in practice.
If you are coming from a tool like SeekWell or PopSQL, the model is similar (and intentionally so): a saved query writes its results into a tab on a real spreadsheet, on a schedule, ready for downstream dashboards.
What you need
- A saved query in SaturnSQL that runs successfully against your database.
- A Google account with edit access to the target spreadsheet.
- The destination spreadsheet itself, with a dedicated tab where results should land.
Step 1: Authenticate your Google account
From a saved query, open the destination panel and pick Google Sheets. SaturnSQL will redirect you to Google’s OAuth screen, where you sign in with the account that owns or has edit access to the target spreadsheet. Approve the requested permissions (read and write access to the specific files SaturnSQL writes to).
Tip: Use a shared team Google account for production exports, not a personal one. When a team member leaves, you do not want their personal Google account taking the schedules with them.
Step 2: Pick the destination spreadsheet and tab
Once authenticated, browse to the spreadsheet you want to write to. Pick the specific tab (sheet) within that spreadsheet for the destination. Use a dedicated tab per query instead of overwriting a shared tab, so different queries do not stomp on each other.
A common pattern teams use:
- One spreadsheet per team (Marketing, Product, Finance)
- One tab per scheduled query (daily-active-users, monthly-revenue, churn-by-cohort)
- Downstream pivot tables, charts, and Looker Studio connections live in separate "view" tabs that reference the raw data tabs
Step 3: Choose where the rows land
Each run replaces the rows the previous run wrote, so the tab always shows the latest result. Two settings decide where those rows go:
- Start cell: A1 by default. Start lower or further right to leave room for your own notes, formulas or charts next to the data. SaturnSQL only clears the range its previous run wrote, never the whole tab.
- Header row: on by default. Column names are written as the first row of the range, and when the data starts in row 1 the header is bold and frozen.
Tip: If you need history, write the query to include a date column and return the whole period you care about (for example the last 90 days), so each run snapshots the full series. Keep it bounded: Google Sheets caps a spreadsheet at 10 million cells.
Step 4: Set the refresh frequency
Pick how often the export should refresh. The same cadence options apply as anywhere else in SaturnSQL: hourly, daily, weekly, or a custom cron expression. See the scheduling guide for details on each option and timezone handling.
For one-off exports, you can skip the schedule entirely and trigger the export manually whenever you need fresh data.
Step 5: Run a test export
Trigger the export once before enabling the schedule. Open the destination sheet and check:
- Did the headers land in row 1?
- Are columns in the order you expect?
- Did number formatting come through correctly (or do you need to format columns in the sheet)?
- If downstream dashboards already exist, do they still resolve?
Handling header rows
SaturnSQL writes column names as the first row of the export range, and rewrites it on every run, so a renamed or added column shows up correctly the next time the schedule fires. Turn headers off if the tab already has its own header row above the start cell.
If your column list changes, formulas and charts that point at columns by letter may need updating, because the data shifts with it.
Troubleshooting
"Permission denied" on an export that used to work
The Google account you connected has lost edit access to the destination spreadsheet. Most common causes: the spreadsheet owner removed sharing; the spreadsheet was moved into a shared drive with different permissions; or the OAuth grant to SaturnSQL was revoked from the user’s Google account settings. Reconnect the Google account and reconfirm the destination.
The destination sheet was renamed or deleted
A rename is usually fine because SaturnSQL stores the internal sheet ID, not the display name. A delete (or moving the spreadsheet to trash) causes the next export to fail. Reconnect and pick a new destination.
Numbers are being written as text
Usually a column-formatting issue in the destination tab. Open the tab, select the affected columns, and set the format to Number or Currency. New rows written by SaturnSQL will inherit that format.
Too many rows / sheet is slow
A query that returns tens or hundreds of thousands of rows makes the sheet slow to open. Add a date filter to your SQL so each run snapshots only the period people actually look at, for example the last 90 days.
Related help articles
- Scheduling SQL queries
- Send SQL results to Slack
- Saving and organizing queries
- Use case: scheduled SQL queries
Ready to sync your SQL to Google Sheets?
