-
Notifications
You must be signed in to change notification settings - Fork 662
feat(sheets): support Connected Sheets (BigQuery data sources) #938
Copy link
Copy link
Open
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestNew feature or requestimpact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.This issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.no-staleExempts this issue from stale automation.Exempts this issue from stale automation.
Description
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestNew feature or requestimpact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.This issue is about auth, provider routing, model choice, or SecretRef resolution.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.no-staleExempts this issue from stale automation.Exempts this issue from stale automation.
Type
Fields
Priority
None yet
I run several reporting spreadsheets wired to BigQuery via Connected Sheets. Keeping the underlying SQL in sync and forcing a refresh from a script (cron / CI / an agent) currently requires opening the Sheets UI by hand —
gogcan't touch the data source side of a spreadsheet at all.The gap
None of the ~35
sheetssubcommands touchDataSource,BigQueryDataSourceSpec, or data execution status, and nothing in the docs mentions it either.It's not just "no write path" — read is barely there either:
Spreadsheethas top-leveldataSources[]anddataSourceSchedules[]fields (per the Sheets API reference), butSheetsMetadataCmd'sFields(...)mask only requestsspreadsheetId,title,locale,timeZone,sheets—dataSourcesis silently dropped.dataSourceIdtoday is an unfilteredgog sheets raw <id>dump. There's no structuredlist, and no way to inspectdataExecutionStatusto tell whether a refresh succeeded, failed, or is still running.What already exists to build on
The underlying Sheets API v4 supports the full lifecycle via
spreadsheets.batchUpdate:AddDataSourceRequest— attach a new BigQuery data source (custom SQL viaBigQueryQuerySpec, or a native table viaBigQueryTableSpec) and create the linkedDATA_SOURCEsheetUpdateDataSourceRequest— change an existing data source's specDeleteDataSourceRequest— remove a data source and its linked sheetRefreshDataSourceRequest— force/queue a re-execution of the data source's queryAll of these types already exist in
google.golang.org/api/sheets/v4, the SDK version gogcli is already pinned to (v0.286.0) — this is missing CLI surface, not an SDK gap.Proposed CLI surface
Note this needs a new OAuth scope (
https://www.googleapis.com/auth/bigquery.readonly) added alongside the existingspreadsheets/drivescopes for thesheetsservice — existing users would need to re-consent.Ref:
spreadsheets.batchUpdate—AddDataSourceRequest/UpdateDataSourceRequest/DeleteDataSourceRequest/RefreshDataSourceRequest;Spreadsheet.dataSources[]/DataSource/BigQueryDataSourceSpecresources.