Docs /Tools and APIs /Gemini in BigQuery
Tools and APIs

Gemini in BigQuery - what each feature does and what it costs

Gemini in BigQuery covers SQL and Python assistance, data insights, data canvas, data preparation, conversational analytics with data agents, and a pipeline agent. Which are free, which bill per token or as ordinary queries, what Gemini can read, and how to turn it off.

Gemini in BigQuery is a set of AI assistance features inside BigQuery Studio, part of Google’s Gemini for Google Cloud suite. It writes and explains SQL and Python, suggests queries for a table, builds query workflows in a visual canvas, suggests data cleaning steps, and answers questions through “data agents”. Per Google’s pricing page, the core features (SQL and Python assistance, data canvas, data preparation) cost nothing extra on any edition or on-demand. Data insights, conversational analytics and the Data Engineering Agent are billed per token under Google’s Data Cloud agent pricing, after a free trial. The queries these features run are normal BigQuery jobs, billed as usual. Google’s docs say plainly that the output can be plausible but wrong, so every generated query needs reading before you run it.

We wrote this from Google’s documentation. The features live in the console, so we could not test them with SQL.

The features

FeatureWhat it doesStatus and notes
SQL generation, explanation and completionTurns a comment or prompt into SQL, explains a query, completes while you typePrompt-based generation and explanation GA; comment-to-SQL and completion Preview. English prompts only
Python code assistGenerates and completes Python in notebooks, including BigQuery DataFrames code (the DataFrames code generation is Preview)Generation and completion GA
Data insightsFor a table: suggested questions with the SQL for them, and generated table and column descriptions. For a dataset: a relationship graph and cross-table queriesSee limits below
Data canvasA graph (DAG) of steps where you find tables with natural language, query them, chart results and branch the analysisGA. Aimed at analysts who read SQL, not business users
Data preparationSuggests cleaning and transformation steps on a sample of a table, with a preview, scheduled through DataformGA on the pricing page, “in preview” in the Pipelines & Connections entry point
Conversational analyticsChat with a data agent configured for a set of tables, views, graphs or UDFs, or chat directly with a data sourceAgents hold context, instructions, glossary terms and verified queries
Data Engineering AgentBuilds, changes and troubleshoots pipelines from natural languageBilled with the same token pricing as the other Data Cloud agents
Translation rulesNatural-language rules for the interactive SQL translatorPreview. See migrating to BigQuery

Google lists areas where natural language commands “might not work well”: BigQuery ML, Apache Spark, object tables, BigLake, INFORMATION_SCHEMA views, JSON, and nested and repeated fields. Data canvas is tuned for basic SQL: FROM clauses, math functions, arrays, structs, and joins of two tables. Gemini can only see what the signed-in user can see.

What it costs

FeatureCharge
SQL and Python assist, data canvas, data preparationno Gemini charge on Standard, Enterprise, Enterprise Plus or on-demand, per Google’s pricing page
Queries and sampling jobs the features runnormal BigQuery query and storage rates. Data preparation says its runs and preview samples use BigQuery resources “charged at the rates shown in BigQuery pricing”
Conversational analyticsBigQuery compute pricing for the queries that run when you create agents and chat with them. Google’s linked agent pricing page adds $3 per million input tokens and $20 per million output tokens for the Conversational Analytics Agent, with a free trial through 31 December 2026. Google recommends project, user and query-level spending limits for agents
Data insightsThe same token pricing ($3 per million input, $20 per million output). Google’s agent pricing page says Data Insights pricing starts on 27 October 2026. Data insights and automated metadata generation are available on on-demand compute, Enterprise or Enterprise Plus, and the quota is counted per organization
Graph questions in conversational analyticsRunning GQL needs an Enterprise or Enterprise Plus reservation and fails on on-demand projects. GRAPH_EXPAND queries and graph measures can run on on-demand

Two settings affect cost. Data canvas has settings for job priority, whether to use cached results, job timeout and maximum bytes billed. Conversational analytics suggests limiting a data agent to under 20 data sources and cleaning or pre-joining tables first, because Google advises joining related tables in a view rather than relying on the agent to work out the joins. See controlling costs for maximum bytes billed.

What Gemini can read

When you use a feature, your prompt and its context go to Google’s models. The context is the metadata and schema of the tables involved, and it can include sampled rows from tables and job history. Google’s statements:

  • Prompts, responses and schema are not used to train models unless you opt in. Some preview features are in a trusted tester program where you can share data for product improvement.
  • Gemini only accesses resources the user has access to, and doesn’t retain contextual information.
  • BigQuery data at rest stays in your chosen location, but processing of prompts is in the US or EU jurisdictions where your data resides, and data outside those jurisdictions is processed globally.
  • Generated code isn’t run for you: you run it, with your own permissions.
  • Cloud Logging audit logs don’t record Gemini in BigQuery prompts and responses.
  • Data preparation opens a BigQuery job under your credentials that samples the table into a temporary table in the same project.

Enabling Gemini in BigQuery gives it access to your tables and query history in the sense above, so decide which projects you enable it for. Google’s overview carries a warning: Gemini in BigQuery is part of Gemini for Google Cloud and “doesn’t support the same compliance and security offerings as BigQuery”, so enable it only for projects without compliance needs Gemini doesn’t cover. The security page lists SOC 1/2/3, ISO/IEC 27001 and HIPAA for GA features, and says Gemini in BigQuery isn’t included in Assured Workloads packages. Read both before enabling it in a regulated project.

Setup and turning it off

To use it, an administrator enables the required APIs (the console prompts when you hover over the Gemini icon in BigQuery Studio) and grants roles. BigQuery Studio User or Admin carries the needed cloudaicompanion.* permissions. Data canvas lists the Gemini for Google Cloud User role (roles/cloudaicompanion.user) as well. A few preview features need a sign-up form for the trusted tester program: automated metadata generation for data insights, and dataset insights with the BigQuery knowledge engine.

To turn features off, a user can clear them in the Gemini settings in the console toolbar, an administrator can revoke the cloudaicompanion permissions, and turning off the Gemini for Google Cloud API disables Gemini across Google Cloud products, BigQuery included.

Limits worth knowing

  • Data insights work on tables, BigLake and external tables, views and Iceberg namespaces, but not GEO or JSON columns. Gemini writes descriptions for at most 350 columns per table, and you need read access to all columns of a table with column-level security to generate insights. Runs don’t always produce queries.
  • Data preparation needs source and destination datasets in the same location. Suggestions are based on a sample of the table, not the whole table. It doesn’t support versioning of preparations.
  • Conversational analytics: an agent holds at most 100 knowledge sources. Agents created before 4 June 2026 are in the global location, and a new agent’s location can’t be changed after saving.
  • SQL assist supports English prompts only.

Prism AI in Querylab.io

For writing, explaining and debugging SQL, Querylab.io has its own agent, Prism AI. It writes a query from a description, or changes the one in the open tab, and shows the change as a diff you apply or reject. It dry-runs the SQL it writes, and the queries it runs on its own are SELECT only. It sees the schema of the tables you attach with @. Query results reach the model only if you allow it (features, modes).

For the AI functions you call from SQL, a different set of features, see generative AI functions.