This document describes how you can use Gemini, an AI-powered collaborator in Google Cloud, to help you do the following in AlloyDB for PostgreSQL:
Learn how and when Gemini for Google Cloud uses your data.
This document is intended for database administrators and data engineers who are familiar with AlloyDB, and somewhat familiar with SQL and data analysis. If you're new to AlloyDB, see AlloyDB overview.
Before you begin
Ensure that Gemini Cloud Assist is set up for your Google Cloud user account and project.
Optional: If you want to follow along with the examples in this document, create the
Singerstable using the following schema:CREATE TABLE Singers ( BirthDate TIMESTAMPTZ, SingerId BIGINT PRIMARY KEY, FirstName VARCHAR(1024), LastName VARCHAR(1024), SingerInfo BYTEA );After you create the
Singerstable, click refreshRefresh to update your database schema.
To disable Gemini features in AlloyDB, repeat this step, and then deselect the Gemini features that you want to disable.
Required roles and permissions
To use Gemini with AlloyDB, you need the following permissions:
alloydb.clusters.getalloydb.databases.listalloydb.instances.executeSqlalloydb.instances.listalloydb.users.listcloudaicompanion.companions.generateCodecloudaicompanion.instances.generateCodeserviceusage.services.getorserviceusage.services.list
You can get this permission through the
roles/alloydb.admin
role. If you don't have this role, contact your Organization Administrator to
request access. You might also be able to get the required permissions through
custom roles or
other predefined roles.
Additionally, ensure that you have database-level permissions for the database that you're using for authentication.