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.
  2. Grant required Identity and Access Management (IAM) roles.
  3. 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

To use Gemini in BigQuery, you must enable the Gemini for Google Cloud API. A service administrator or project owner with the serviceusage.services.enable IAM permission typically performs this step.

  1. To enable the Gemini for Google Cloud API, go to the Gemini for Google Cloud page in the Google Cloud Marketplace.

    Go to Gemini for Google Cloud

  2. In the project selector, select a project.

  3. Click Enable.

    The page updates and shows a status of Enabled. Gemini in BigQuery is now available in the selected Google Cloud project to all users who have the required IAM permissions.

Grant IAM roles on a Google Cloud project

This section describes the steps required to grant the Gemini for Google Cloud User role (roles/cloudaicompanion.user) to users. Additional roles are required for other Gemini in BigQuery features. An administrator typically performs this step.

  1. To grant the IAM roles that are required to use Gemini in BigQuery, go to the IAM & Admin page.

    Go to IAM & Admin

  2. To grant access, click View by principals.

  3. In the Principal column, find a principal for which you want to enable access to Gemini in BigQuery, and then click Edit principal in that row.

  4. In the Edit access pane, click Add another role.

  5. In the Select a role list, select Gemini for Google Cloud User. Users with the Gemini for Google Cloud User role can use Gemini for Google Cloud, but they might need additional permission to use specific Gemini in BigQuery features.

  6. Optional: Grant roles that give permissions to access other Gemini in BigQuery features, if necessary:

  7. Click Save.

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