Stay organized with collections
Save and categorize content based on your preferences.
This document describes how Gemini in BigQuery, which is part
of the Gemini for Google Cloud product suite,
provides AI-powered assistance to help you work with your data.
AI assistance with Gemini in BigQuery
Gemini in BigQuery provides AI assistance to help
you do the following:
Explore and understand your data with data insights. Data insights offers an automated,
intuitive way to uncover patterns and perform statistical analysis by using insightful queries
that are generated from the metadata of your tables. This feature is especially helpful in
addressing the cold-start challenges of early data exploration. For more information, see
Generate data insights in BigQuery.
Discover, transform, query, and visualize data with BigQuery data canvas. You can use
natural language with Gemini in BigQuery, to find, join, and
query table assets, visualize results, and seamlessly collaborate with others throughout the
entire process. For more information, see Analyze with
data canvas.
Get assisted SQL and Python data analysis. You can use Gemini in
BigQuery to generate or suggest code in either SQL or Python, and to explain
an existing SQL query. You can also use natural language queries to begin data analysis. To
learn how to generate, complete, and summarize code, see the following documentation:
Prepare data for analysis. Data preparation in BigQuery gives you context
aware, AI-generated transformation recommendations to cleanse data for analysis. For more
information, see Prepare data with Gemini.
Customize your SQL translations with translation rules. (Preview)
Create Gemini-enhanced translation rules to customize your SQL translations when
using the interactive SQL translator.
You can describe changes to the SQL translation output using natural language prompts or specify
SQL patterns to find and replace. For more information, see Create a translation
rule.
Gemini for Google Cloud doesn't use your prompts or its
responses as data to train its models without your express permission. For more
information about how Google uses your data, see
How Gemini for Google Cloud uses your data.
After you set up Gemini in BigQuery,
you can use Gemini in BigQuery to do the following
in BigQuery Studio:
To generate data insights,
go to the Insights tab for a table entry,
where you can identify patterns, assess quality, and run statistical
analysis across your BigQuery data.
To use natural language to generate SQL or Python code, or receive
suggestions with autocomplete while typing,
use the SQL generation tool for your
SQL queries or
Python code.
Gemini in BigQuery can also
explain your SQL code in natural language.
In order to provide accurate results, Gemini in
BigQuery requires access to both your
Customer Data and metadata
in BigQuery for enhanced features. Enabling Gemini
in BigQuery grants Gemini permission to access
this data, which includes your tables and query history. Gemini
in BigQuery doesn't use your data to train or fine-tune its
models. For more information on how Gemini uses your data, see
how Gemini for Google Cloud uses your data.
Enhanced features in Gemini in BigQuery are the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eGemini in BigQuery offers AI-powered assistance to explore, understand, and analyze your data by using data insights, and data canvas features.\u003c/p\u003e\n"],["\u003cp\u003eYou can utilize Gemini in BigQuery to generate, complete, and explain SQL and Python code, as well as translate SQL code.\u003c/p\u003e\n"],["\u003cp\u003eGemini in BigQuery helps optimize your data infrastructure with recommendations for partitioning, clustering, and materialized views.\u003c/p\u003e\n"],["\u003cp\u003eWith Gemini in BigQuery you can use the Data preparation tool to get AI-generated data transformation recommendations to prepare your data for analysis.\u003c/p\u003e\n"],["\u003cp\u003eGemini in BigQuery allows for advanced troubleshooting of serverless Apache Spark workloads by explaining job errors and offering actionable recommendations.\u003c/p\u003e\n"]]],[],null,["# Gemini in BigQuery overview\n\nThis document describes how Gemini in BigQuery, which is part\nof the [Gemini for Google Cloud](/gemini/docs/overview) product suite,\nprovides AI-powered assistance to help you work with your data.\n\nAI assistance with Gemini in BigQuery\n-------------------------------------\n\nGemini in BigQuery provides AI assistance to help\nyou do the following:\n\n- **Explore and understand your data with data insights** . Data insights offers an automated, intuitive way to uncover patterns and perform statistical analysis by using insightful queries that are generated from the metadata of your tables. This feature is especially helpful in addressing the cold-start challenges of early data exploration. For more information, see [Generate data insights in BigQuery](/bigquery/docs/data-insights).\n- **Discover, transform, query, and visualize data with BigQuery data canvas** . You can use natural language with Gemini in BigQuery, to find, join, and query table assets, visualize results, and seamlessly collaborate with others throughout the entire process. For more information, see [Analyze with\n data canvas](/bigquery/docs/data-canvas).\n- **Get assisted SQL and Python data analysis** . You can use Gemini in BigQuery to generate or suggest code in either SQL or Python, and to explain an existing SQL query. You can also use natural language queries to begin data analysis. To learn how to generate, complete, and summarize code, see the following documentation: \n - SQL code assist\n - [Use the SQL generation tool](/bigquery/docs/write-sql-gemini#use_the_sql_generation_tool)\n - [Prompt to generate SQL queries](/bigquery/docs/write-sql-gemini#chat)\n - [Generate SQL queries with Gemini Cloud Assist](/bigquery/docs/write-sql-gemini#chat) ([Preview](/products#product-launch-stages))\n - [Complete a SQL query](/bigquery/docs/write-sql-gemini#complete_a_sql_query) ([Preview](/products#product-launch-stages))\n - [Explain a SQL query](/bigquery/docs/write-sql-gemini#explain_a_sql_query)\n - Python code assist\n - [Generate Python code with the code generation tool](/bigquery/docs/write-sql-gemini#generate_python_code)\n - [Generate Python code with Gemini Cloud Assist](/bigquery/docs/write-sql-gemini#chat-python) ([Preview](/products#product-launch-stages))\n - [Python code completion](/bigquery/docs/write-sql-gemini#python_code_completion)\n - [Generate BigQuery DataFrames Python code](/bigquery/docs/write-sql-gemini#dataframe) ([Preview](/products#product-launch-stages))\n- **Prepare data for analysis** . Data preparation in BigQuery gives you context aware, AI-generated transformation recommendations to cleanse data for analysis. For more information, see [Prepare data with Gemini](/bigquery/docs/data-prep-get-suggestions).\n- **Customize your SQL translations with translation rules** . ([Preview](/products#product-launch-stages)) Create Gemini-enhanced translation rules to customize your SQL translations when using the [interactive SQL translator](/bigquery/docs/interactive-sql-translator). You can describe changes to the SQL translation output using natural language prompts or specify SQL patterns to find and replace. For more information, see [Create a translation\n rule](/bigquery/docs/interactive-sql-translator#create_a_translation_rule).\n\nGemini for Google Cloud doesn't use your prompts or its\nresponses as data to train its models without your express permission. For more\ninformation about how Google uses your data, see\n[How Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance).\n| As an early-stage technology, Gemini for Google Cloud\n| products can generate output that seems plausible but is factually incorrect. We recommend that you\n| validate all output from Gemini for Google Cloud products before you use it.\n| For more information, see\n| [Gemini for Google Cloud and responsible AI](/gemini/docs/discover/responsible-ai).\n| **Note** : Gemini in BigQuery is part of Gemini for Google Cloud and doesn't support the same compliance and security offerings as BigQuery. You should only set up Gemini in BigQuery for BigQuery projects that don't require [compliance offerings that aren't supported by Gemini for Google Cloud](/gemini/docs/discover/certifications). For information about how to turn off or prevent access to Gemini in BigQuery, see [Turn off Gemini for Google Cloud products](/gemini/docs/turn-off-gemini).\n\nPricing\n-------\n\nSee [Gemini for Google Cloud pricing](/products/gemini/pricing).\n\nQuotas and limits\n-----------------\n\nFor quotas and limits that apply to Gemini in BigQuery,\nsee [Gemini for Google Cloud quotas and limits](/gemini/docs/quotas).\n\nWhere to interact with Gemini in BigQuery\n-----------------------------------------\n\nAfter you [set up Gemini in BigQuery](/gemini/docs/bigquery/set-up-gemini),\nyou can use Gemini in BigQuery to do the following\nin BigQuery Studio:\n\n- To [generate data insights](/bigquery/docs/data-insights#insights-bigquery-table), go to the **Insights** tab for a table entry, where you can identify patterns, assess quality, and run statistical analysis across your BigQuery data.\n- To use data canvas, [create a data canvas or use data canvas](/bigquery/docs/data-canvas#work-with-data-canvas) from a table or query to explore data assets with natural language and share your canvases.\n- To use natural language to generate SQL or Python code, or receive suggestions with autocomplete while typing, use the **SQL generation tool** for your [SQL queries](/bigquery/docs/write-sql-gemini#generate_a_sql_query) or [Python code](/bigquery/docs/write-sql-gemini#python_code_completion). Gemini in BigQuery can also explain your SQL code in natural language.\n- To prepare data for analysis, in the **Create new** list, select **Data preparation** . For more information, see [Open the data preparation editor in BigQuery](/bigquery/docs/data-prep-get-suggestions#open-data-prep-editor).\n\nSet up Gemini in BigQuery\n-------------------------\n\nFor detailed setup steps, see\n[Set up Gemini in BigQuery](/gemini/docs/bigquery/set-up-gemini).\n\nHow Gemini in BigQuery uses your data\n-------------------------------------\n\nIn order to provide accurate results, Gemini in\nBigQuery requires access to both your\n[Customer Data](/terms/data-processing-addendum) and metadata\nin BigQuery for enhanced features. Enabling Gemini\nin BigQuery grants Gemini permission to access\nthis data, which includes your tables and query history. Gemini\nin BigQuery doesn't use your data to train or fine-tune its\nmodels. For more information on how Gemini uses your data, see\n[how Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance).\n\nEnhanced features in Gemini in BigQuery are the following:\n\n- SQL generation tool\n- Prompt to generate SQL queries\n- Complete a SQL query\n- Explain a SQL query\n- Generate python code\n- Python code completion\n- Data canvas\n- Data preparation\n- Data insights\n\n### Locations\n\nFor information about where Gemini processes your data, see\n[Gemini serving locations](/gemini/docs/locations).\n\nWhat's next\n-----------\n\n- See the latest enhancements and fixes in [release notes](/gemini/docs/release-notes).\n- Learn how to [set up Gemini in BigQuery](/gemini/docs/bigquery/set-up-gemini).\n- Learn how to [write queries with Gemini assistance](/bigquery/docs/write-sql-gemini).\n- Learn more about [Google Cloud compliance](/security/compliance)."]]