How to Import BigQuery Saved Queries into Contextflo
Import your existing BigQuery saved queries into Contextflo with a few clicks. This guide covers permissions setup, selecting queries, and keeping them in sync.
If your team already has SQL it trusts in BigQuery, you don't need to rewrite it. Import those saved queries once and Claude reuses that verified SQL when someone asks a matching question, instead of writing its own from scratch.
That last part is the reason to bother. A saved query in Contextflo isn't just a stored snippet. When someone asks a question, Claude checks your saved queries first and reuses the SQL when one fits, so the answer comes from logic your team already reviewed rather than a fresh guess at your join keys and filters.
If you have a query that took three people and a week to agree on, this is how it stops being re-derived.
Before you start
- A BigQuery datasource already connected in Contextflo (see the BigQuery setup guide if you haven't done that yet)
- Saved queries in your BigQuery project
- Admin access in your Contextflo workspace
- The Dataform Viewer role on the service account Contextflo uses. BigQuery stores saved queries in Dataform, so without this role the integration connects fine and simply shows an empty list
That last one is worth sorting before you start rather than discovering halfway through, since in most orgs the person importing queries isn't the person who can grant IAM roles.
Import your queries
Go to BI Integrations and click BigQuery Saved Queries.
If you see "No saved queries found", the service account is missing the Dataform Viewer role:
- Copy the service account email shown on the integration page
- In the GCP console, go to IAM & Admin → Grant Access, paste the email, and assign Dataform Viewer
- Back in Contextflo, click Retry. IAM changes can take up to 60 seconds to propagate, so if it doesn't work immediately, wait and try once more
Once your queries appear:
- Select the ones you want, or use Select All. Anything already imported shows an Imported badge
- Click Import. Re-importing updates the existing query with the latest SQL, so you won't end up with duplicates
- Click View imported queries to see them in your workspace
Keeping queries in sync
Changes in BigQuery don't sync automatically. When a query changes upstream, go back to BI Integrations → BigQuery Saved Queries, select it, and re-import. Select All → Import bulk-refreshes everything at once.
Worth doing after any meaningful change to your models. A saved query that has drifted from its BigQuery original is worse than not importing it at all, because Claude will reuse it with the same confidence as a correct one.
If your definitions change often, the practical habit is a bulk re-import whenever you ship a change to the underlying models, rather than tracking which individual queries moved.
Bring the SQL your team already trusts into Claude. Free for one user and one data source.
Get started for free, or talk to the founder. Questions about a specific setup: [email protected].