Set up Gemini in BigQuery

Before you can use Gemini in BigQuery, which offers AI-powered assistance for your data analytics, your team must do the following:

  1. Enable necessary APIs and grant roles.
  2. Turn on Gemini in BigQuery features in the Google Cloud console.

Some Gemini in BigQuery features are available at no additional charge while other features require quota which is earned by using compute capacity. To learn more about using Gemini in BigQuery features, see Gemini in BigQuery pricing.

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 project owner with the serviceusage.services.enable IAM permission typically performs this step.

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

    Go to BigQuery Studio

  2. View a Gemini in BigQuery feature in the the Google Cloud console. For example, in BigQuery Studio hover over the pen_sparkGemini icon.

    Gemini button in the BigQuery toolbar.

    You are prompted to enable additional Google Cloud APIs.

  3. Click Continue to get started enabling required Google Cloud APIs. A side panel lists the required APIs required to use Gemini in BigQuery.

  4. For each required API, click Enable to enable the API for the current project, and then click Next.

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

  6. Click Done.

Turn on Gemini in BigQuery features

If you're a data analyst, data scientist, or developer who wants to use specific Gemini in BigQuery features to write SQL queries and Python code, then you need to turn on the feature in the Google Cloud console. To learn how to turn on features, see Before you begin in "Write queries with Gemini assistance." Users who have the necessary IAM roles or permissions can then access the Gemini in BigQuery features that you enabled for their Google Cloud project. For more information, see Gemini for Google Cloud overview.

Use data insights and automated metadata generation features

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

If your organization is using BigQuery Standard edition for compute only, then you can use Gemini Code Assist Standard, which includes data insights and automated metadata generation capabilities in addition to features listed in Gemini Code Assist Standard and Enterprise pricing overview. To learn how to purchase Gemini Code Assist Standard, see Purchase a Gemini Code Assist Standard subscription and follow the instructions to purchase Standard edition.

Enable Gemini in BigQuery preview features

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

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

  • SQL query completion (Preview)
  • Automated metadata generation for data insights (Preview)
  • Natural language expressions in SQL (Experimental)
  • Dataset insights with BigQuery knowledge engine (Preview)

What's next