Set up Gemini in BigQuery

Before you can useGemini in BigQuery, whichoffers AI-powered assistance for your data analytics, your team must enablenecessary APIs and grant roles.

Some Gemini in BigQuery features are available at noadditional charge while other features requirequotawhich is earned by using compute capacity. To learn more about usingGemini in BigQuery features, seeGeminiin BigQuery pricing.

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 requirecompliance offerings that aren't supported by Gemini for Google Cloud. For information about how to turn off or prevent access to Gemini in BigQuery, seeTurn off Gemini for Google Cloud products.

Enable necessary APIs and grant roles

To use Gemini in BigQuery,you must enable required APIs and grant necessary Identity and Access Management (IAM)roles. A service administrator or projectowner with theserviceusage.services.enable IAM permissiontypically performs this step. For a list of APIs and services used byBigQuery, seeManage BigQuery API dependencies.

  1. In the the Google Cloud console, with your project selected, go to theBigQuery Studio page.

    Go to BigQuery Studio

  2. View a Gemini in BigQuery feature in thethe Google Cloud console. For example, in BigQuery Studio hoverover thepen_sparkGemini icon.

    Gemini button in the BigQuery toolbar.

    You are prompted to enable additional Google Cloud APIs.

  3. ClickContinue to get started enabling requiredGoogle Cloud APIs. A side panel lists the required APIsrequired to use Gemini in BigQuery.

  4. For each required API, clickEnable to enable the API for the currentproject, and then clickNext.

  5. To grant principals the IAM roles that are required to useGemini in BigQuery, enter their user names.The following roles grant the permissions required to use Gemini:

  6. ClickDone.

Turn on Gemini in BigQuery features

If you're a data analyst, data scientist, or developer who wants to usespecific Gemini in BigQuery features to writeSQL queries and Python code, then you can toggle certain Geminifeatures in the Google Cloud console. To learn how to toggle features, seeBefore you begin in"Write queries with Gemini assistance." For more information, seeGemini for Google Cloud overview.

Use data insights and automated metadata generation features

BigQuery data insights and automated metadata generation featuresare available to customers using BigQuery on-demand compute,Enterprise edition, or Enterprise Plus edition. The quota fordata insights scans and metadata generation is based on the use of thesecompute models at theorganization level. For information about quotas for these features, seeQuotas for Gemini in BigQuery.

If your organization is using BigQuery Standard editionfor compute only, then you can use Gemini Code Assist Standard, whichincludes data insights and automated metadata generation capabilities inaddition to features listed inGemini Code Assist Standard andEnterprise pricingoverview.To learn how to purchase Gemini Code Assist Standard, seePurchase aGemini Code Assist Standardsubscription andfollow the instructions to purchase Standard edition.

Enable Gemini in BigQuery preview features

Certain Gemini in BigQuery features inPrevieware part of the trusted tester program. To request access to these features,an administrator must complete theGemini in BigQuery Pre-GA Sign-up form.Gemini in BigQuery pre-GA feature access isenabled periodically in batches.

Preview features that require Gemini in BigQuerysign-up include the following:

  • Automated metadata generation for data insights (Preview)
  • Dataset insights with BigQuery knowledge engine (Preview)

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.