1. はじめに
この Codelab では、AlloyDB for PostgreSQL とその AI 機能を使用して、スマートな会議セッションの検索とおすすめシステムを構築します。従来のキーワード検索と高度なセマンティック ベクトル検索を組み合わせる方法、QueryData を使用して自然言語から予測可能な SQL ステートメントを生成する方法、インテリジェントな演算子関数を利用する方法について説明します。
演習内容
- AlloyDB クラスタをデプロイし、AI 機能を有効にします。
- 会議データセット を読み込み、その構造を理解します。
- AlloyDB データアクセス API を有効にします。
- セマンティック アクションに AI 演算子などの AlloyDB
ai.ifやai.rankを使用します。 - セマンティック ベクトル(ScaNN)検索とテキスト(RUM)検索を組み合わせたハイブリッド検索 を実装します。
- AlloyDB で QueryData を有効にします。
- QueryData テンプレートを生成します。
- AI エージェントで QueryData を使用します。
必要なもの
- ウェブブラウザ(Chrome など)
- 課金を有効にした Google Cloud プロジェクト
この Codelab は、初心者を含むあらゆるレベルのデベロッパーを対象としています。
合計所要時間: 60 ~ 70 分 。推定費用: 3 米ドル未満 (この Codelab で作成したリソースは、標準の無料利用枠またはトライアル使用の対象となります)。
2. 設定と要件
プロジェクトのセットアップ
Google Cloud コンソールにログインします。Gmail アカウントも Google Workspace アカウントもまだお持ちでない場合は、アカウントを作成してください。
仕事用または学校用アカウントではなく、個人アカウントを使用してください。
Google Cloud プロジェクトの作成
- Google Cloud コンソールのプロジェクト選択ページで、Google Cloud プロジェクトを選択または作成します。
- Cloud プロジェクトに対して課金が有効になっていることを確認します。プロジェクトで課金が有効になっているかどうかを確認する方法をご覧ください。
Cloud Shell の起動
Google Cloud はノートパソコンからリモートで操作できますが、この Codelab では、Google Cloud Shell(Cloud 上で動作するコマンドライン環境)を使用します。
- Google Cloud コンソールの上部にある「Cloud Shell をアクティブにする 」アイコンをクリックします。
- 認証を確認します。
gcloud auth list
- プロジェクトを確認します。
gcloud config get project
- 必要に応じて 設定します。
export PROJECT_ID=<YOUR_PROJECT_ID>
gcloud config set project $PROJECT_ID
3. 始める前に
API を有効にする
次のコマンドを実行して、必要なすべての API を有効にします。
gcloud services enable alloydb.googleapis.com \
compute.googleapis.com \
cloudresourcemanager.googleapis.com \
servicenetworking.googleapis.com \
aiplatform.googleapis.com \
geminidataanalytics.googleapis.com
API の概要
- AlloyDB API (
alloydb.googleapis.com)を使用すると、AlloyDB for PostgreSQL クラスタを作成、管理、スケーリングできます。要求の厳しいエンタープライズ トランザクション ワークロードと分析ワークロード向けに設計された、PostgreSQL 互換のフルマネージド データベース サービスを提供します。 - Compute Engine API (
compute.googleapis.com)を使用すると、仮想マシン(VM)、永続ディスク、ネットワーク設定を作成して管理できます。ワークロードの実行に必要なコア Infrastructure-as-a-Service(IaaS)基盤と、多くのマネージド サービスの基盤となるインフラストラクチャを提供します。 - Cloud Resource Manager API (
cloudresourcemanager.googleapis.com)を使用すると、Google Cloud プロジェクトのメタデータと構成をプログラムで管理できます。リソースの整理、Identity and Access Management(IAM)ポリシーの処理、プロジェクト階層全体での権限の検証を行うことができます。 - Service Networking API (
servicenetworking.googleapis.com)を使用すると、Virtual Private Cloud(VPC)ネットワークと Google のマネージド サービス間のプライベート接続の設定を自動化できます。AlloyDB などのサービスでプライベート IP アクセスを確立し、他のリソースと安全に通信できるようにするために必要です。 - Vertex AI API (
aiplatform.googleapis.com)を使用すると、アプリケーションで機械学習モデルを構築、デプロイ、スケーリングできます。生成 AI モデル(Gemini など)やカスタムモデル トレーニングへのアクセスなど、Google Cloud のすべての AI サービスに統合されたインターフェースを提供します。 - Data Analytics API (
geminidataanalytics.googleapis.com)を使用すると、アプリケーションで BI プロダクトの一般的な AI 機能を使用できます。
4. AlloyDB をプロビジョニングする
AlloyDB クラスタとプライマリ インスタンスを作成します。
プライベート IP 範囲を作成する
AlloyDB には VPC のプライベート IP 範囲が必要です。default VPC ネットワークを使用していると仮定します。
- プライベート IP 範囲を作成します。
gcloud compute addresses create psa-range \
--global \
--purpose=VPC_PEERING \
--prefix-length=24 \
--description="VPC private service access" \
--network=default
- プライベート接続を確立します。
gcloud services vpc-peerings connect \
--service=servicenetworking.googleapis.com \
--ranges=psa-range \
--network=default
AlloyDB クラスタを作成する
postgresユーザーのパスワードを作成します。
export PGPASSWORD=`openssl rand -hex 12`
echo $PGPASSWORD
- 無料トライアル クラスタ(「TRIAL」)を作成します。初めてでない場合は、標準クラスタ(「STANDARD」)を作成します。
export REGION=us-central1
export ADBCLUSTER=alloydb-next26-ai-demo-01
gcloud alloydb clusters create $ADBCLUSTER \
--password=$PGPASSWORD \
--network=default \
--region=$REGION \
--subscription-type=TRIAL
- プライマリ インスタンスを作成します。
gcloud alloydb instances create $ADBCLUSTER-pr \
--instance-type=PRIMARY \
--cpu-count=8 \
--region=$REGION \
--cluster=$ADBCLUSTER
5. データベース権限を設定する
エンベディング生成の Vertex AI 権限を有効にする
PROJECT_ID=$(gcloud config get-value project)
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:service-$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)")@gcp-sa-alloydb.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"
データアクセス API を有効にする
自然言語から予測可能な SQL ステートメントを作成するためのテンプレートを作成するために QueryData コンテキストを使用するには、AlloyDB クラスタで Data Access API を有効にする必要があります。
同じターミナルタブで次を実行します。
PROJECT_ID=$(gcloud config get-value project)
REGION=us-central1
ADBCLUSTER=alloydb-next26-ai-demo-01
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
https://alloydb.googleapis.com/v1alpha/projects/$PROJECT_ID/locations/$REGION/clusters/$ADBCLUSTER/instances/$ADBCLUSTER-pr?updateMask=dataApiAccess \
-d '{
"dataApiAccess": "ENABLED",
}'
IAM 認証を有効にする
エージェント ツールを使用するには、インスタンスで IAM 認証を有効にしてから、自分自身をユーザーとして追加する必要があります。
同じターミナルタブで次を実行して、インスタンスで IAM を有効にします。
PROJECT_ID=$(gcloud config get-value project)
REGION=us-central1
ADBCLUSTER=alloydb-next26-ai-demo-01
gcloud beta alloydb instances update $ADBCLUSTER-pr \
--database-flags alloydb.iam_authentication=on \
--region=$REGION \
--cluster=$ADBCLUSTER \
--project=$PROJECT_ID \
--update-mode=FORCE_APPLY
自分自身を AlloyDB ユーザーとして追加します。
REGION=us-central1
ADBCLUSTER=alloydb-next26-ai-demo-01
gcloud alloydb users create $(gcloud config get-value account) \
--cluster=$ADBCLUSTER \
--region=$REGION \
--type=IAM_BASED \
--db-roles=alloydbsuperuser
6. サンプル データベースを準備する
AlloyDB Studio に接続する
- Google Cloud コンソールで [**AlloyDB for Postgres**] ページに移動します。
- プライマリ インスタンスをクリックします。
- 左側のナビゲーションで [AlloyDB Studio] をクリックします。
postgresデータベースを選択します。IAM database authenticationで認証します。
データベースを作成する
クエリエディタで次の SQL を実行します。
CREATE DATABASE conference_db;
次の操作で conference_db データベースに切り替えます。
Current user画面の左上にあるAlloyDB studioボタンをクリックします。Switch user/database[button] をクリックします。- 新しく作成した
conference_dbデータベースを選択します。
pgvector を有効にする
標準の vector 拡張機能が有効になっていることを確認します。
CREATE EXTENSION IF NOT EXISTS vector;
サンプルデータを読み込む
次の SQL スクリプトを実行してスキーマを作成し、サンプルデータを入力します。
1. 以前の競合するテーブルをクリーンアップする
DROP TABLE IF EXISTS public.attendees_sessions CASCADE;
DROP TABLE IF EXISTS public.session_speaker_mapping CASCADE;
DROP TABLE IF EXISTS public.session_topic_mapping CASCADE;
DROP TABLE IF EXISTS public.session CASCADE;
DROP TABLE IF EXISTS public.attendees CASCADE;
DROP TABLE IF EXISTS public.speaker CASCADE;
DROP TABLE IF EXISTS public.session_topic CASCADE;
2. テーブルを作成する
CREATE TABLE public.attendees (
username character varying(100) NOT NULL PRIMARY KEY,
name character varying(100),
company character varying(150),
job_title character varying(100),
area_of_interest character varying(100),
street_address text,
city character varying(100),
state_province character varying(100),
country character varying(100),
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE public.attendees_sessions (
username character varying(100) NOT NULL REFERENCES public.attendees(username),
session_id character varying(50) NOT NULL,
registration_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (username, session_id)
);
CREATE TABLE public.session (
session_id character varying(50) NOT NULL PRIMARY KEY,
session_name character varying(255) NOT NULL,
full_description text,
full_description_embedding vector(768) GENERATED ALWAYS AS (embedding('text-embedding-005', full_description)) STORED,
description_tsvector tsvector GENERATED ALWAYS AS (to_tsvector('english', full_description)) STORED,
session_format character varying(50),
learning_level character varying(50),
session_url character varying(255),
for_job_role character varying(250),
session_date date,
session_start_time time without time zone,
session_end_time time without time zone,
session_location character varying(100),
capacity integer,
remaining_capacity integer,
interest_area character varying(100),
industry character varying(100)
);
COMMENT ON COLUMN public.session.session_format IS 'The format of a session. Possible values are Keynotes, Breakouts, Lightning Talks.';
CREATE TABLE public.speaker (
speaker_id integer NOT NULL PRIMARY KEY,
speaker_name character varying(100) NOT NULL,
job_title character varying(100),
company character varying(100),
type character varying(50),
profile_pic character varying(100),
speaker_url character varying(100)
);
CREATE TABLE public.session_speaker_mapping (
session_id character varying(50) NOT NULL REFERENCES public.session(session_id),
speaker_id integer NOT NULL REFERENCES public.speaker(speaker_id),
PRIMARY KEY (session_id, speaker_id)
);
CREATE TABLE public.session_topic (
topic character varying(100) NOT NULL PRIMARY KEY,
topic_desc text,
embedding vector(768) GENERATED ALWAYS AS (embedding('text-embedding-005', topic_desc)) STORED
);
CREATE TABLE public.session_topic_mapping (
session_id character varying(50) NOT NULL REFERENCES public.session(session_id),
topic character varying(100) NOT NULL REFERENCES public.session_topic(topic),
PRIMARY KEY (session_id, topic)
);
3. テーブルにサンプルデータを入力する
3.1 セッション トピックを入力する
-- Insert Topics
INSERT INTO public.session_topic (topic, topic_desc) VALUES
('Databases', 'Relational and non-relational database technologies.'),
('AI & Machine Learning', 'Generative AI, LLMs, and ML infrastructure.'),
('Cloud Architecture', 'Designing scalable and resilient cloud systems.'),
('Security', 'Identity, compliance, and network security.'),
('DevOps', 'CI/CD, platform engineering, and automation.') ON CONFLICT DO NOTHING;
3.2 スピーカーを入力する
-- Insert Speakers
INSERT INTO public.speaker (speaker_id, speaker_name, job_title, company, type, profile_pic, speaker_url) VALUES
(1, 'Speaker 1', 'Director of Engineering', 'DeepMind', 'External', 'pic_1.png', 'http://speakers.com/1'),
(2, 'Speaker 2', 'Cloud Architect', 'Verily', 'External', 'pic_2.png', 'http://speakers.com/2'),
(3, 'Speaker 3', 'Product Manager', 'GlobalEnterprises', 'External', 'pic_3.png', 'http://speakers.com/3'),
(4, 'Speaker 4', 'Tech Lead', 'Google', 'Internal', 'pic_4.png', 'http://speakers.com/4'),
(5, 'Speaker 5', 'Security Engineer', 'DeepMind', 'External', 'pic_5.png', 'http://speakers.com/5'),
(6, 'Speaker 6', 'DevOps Engineer', 'DeepMind', 'External', 'pic_6.png', 'http://speakers.com/6'),
(7, 'Speaker 7', 'Product Manager', 'DataSystems', 'External', 'pic_7.png', 'http://speakers.com/7'),
(8, 'Speaker 8', 'Director of Engineering', 'Google', 'Internal', 'pic_8.png', 'http://speakers.com/8'),
(9, 'Speaker 9', 'Cloud Architect', 'Google', 'Internal', 'pic_9.png', 'http://speakers.com/9'),
(10, 'Speaker 10', 'DevOps Engineer', 'Alphabet', 'Internal', 'pic_10.png', 'http://speakers.com/10'),
(11, 'Speaker 11', 'Tech Lead', 'Alphabet', 'External', 'pic_11.png', 'http://speakers.com/11'),
(12, 'Speaker 12', 'Product Manager', 'Alphabet', 'External', 'pic_12.png', 'http://speakers.com/12'),
(13, 'Speaker 13', 'Tech Lead', 'SoftSolutions', 'Internal', 'pic_13.png', 'http://speakers.com/13'),
(14, 'Speaker 14', 'Director of Engineering', 'Verily', 'Internal', 'pic_14.png', 'http://speakers.com/14'),
(15, 'Speaker 15', 'DevOps Engineer', 'CloudNative', 'External', 'pic_15.png', 'http://speakers.com/15'),
(16, 'Speaker 16', 'Software Engineer', 'Waymo', 'External', 'pic_16.png', 'http://speakers.com/16'),
(17, 'Speaker 17', 'DevOps Engineer', 'Google', 'External', 'pic_17.png', 'http://speakers.com/17'),
(18, 'Speaker 18', 'Data Scientist', 'GlobalEnterprises', 'External', 'pic_18.png', 'http://speakers.com/18'),
(19, 'Speaker 19', 'Security Engineer', 'Waymo', 'Internal', 'pic_19.png', 'http://speakers.com/19'),
(20, 'Speaker 20', 'Tech Lead', 'SoftSolutions', 'Internal', 'pic_20.png', 'http://speakers.com/20') ON CONFLICT (speaker_id) DO NOTHING;
3.3 参加者を入力する
-- Insert Attendees
INSERT INTO public.attendees (username, name, company, job_title, area_of_interest, street_address, city, state_province, country) VALUES
('user_1', 'Attendee 1', 'GlobalEnterprises', 'Data Scientist', 'DevOps', '1 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_2', 'Attendee 2', 'Alphabet', 'Director of Engineering', 'DevOps', '2 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_3', 'Attendee 3', 'CloudNative', 'Data Scientist', 'AI & Machine Learning', '3 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_4', 'Attendee 4', 'SoftSolutions', 'Product Manager', 'DevOps', '4 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_5', 'Attendee 5', 'DataSystems', 'Software Engineer', 'DevOps', '5 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_6', 'Attendee 6', 'Google', 'Director of Engineering', 'Security', '6 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_7', 'Attendee 7', 'Waymo', 'Product Manager', 'AI & Machine Learning', '7 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_8', 'Attendee 8', 'Verily', 'Product Manager', 'DevOps', '8 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_9', 'Attendee 9', 'Waymo', 'Software Engineer', 'DevOps', '9 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_10', 'Attendee 10', 'Waymo', 'DevOps Engineer', 'Databases', '10 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_11', 'Attendee 11', 'GlobalEnterprises', 'Tech Lead', 'Cloud Architecture', '11 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_12', 'Attendee 12', 'Google', 'Tech Lead', 'DevOps', '12 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_13', 'Attendee 13', 'DeepMind', 'Software Engineer', 'Cloud Architecture', '13 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_14', 'Attendee 14', 'DataSystems', 'Security Engineer', 'DevOps', '14 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_15', 'Attendee 15', 'DeepMind', 'Security Engineer', 'Cloud Architecture', '15 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_16', 'Attendee 16', 'Verily', 'Security Engineer', 'Cloud Architecture', '16 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_17', 'Attendee 17', 'Google', 'Software Engineer', 'Cloud Architecture', '17 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_18', 'Attendee 18', 'GlobalEnterprises', 'Security Engineer', 'DevOps', '18 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_19', 'Attendee 19', 'CloudNative', 'Data Scientist', 'Databases', '19 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_20', 'Attendee 20', 'DataSystems', 'Cloud Architect', 'AI & Machine Learning', '20 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_21', 'Attendee 21', 'Google', 'Data Scientist', 'Databases', '21 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_22', 'Attendee 22', 'TechCorp', 'Data Scientist', 'DevOps', '22 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_23', 'Attendee 23', 'DeepMind', 'Product Manager', 'Databases', '23 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_24', 'Attendee 24', 'Google', 'Cloud Architect', 'AI & Machine Learning', '24 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_25', 'Attendee 25', 'GlobalEnterprises', 'Software Engineer', 'AI & Machine Learning', '25 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_26', 'Attendee 26', 'Verily', 'Security Engineer', 'Security', '26 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_27', 'Attendee 27', 'GlobalEnterprises', 'Tech Lead', 'Databases', '27 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_28', 'Attendee 28', 'Google', 'Tech Lead', 'Databases', '28 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_29', 'Attendee 29', 'SoftSolutions', 'Software Engineer', 'Databases', '29 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_30', 'Attendee 30', 'Verily', 'DevOps Engineer', 'Databases', '30 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_31', 'Attendee 31', 'DeepMind', 'Data Scientist', 'Databases', '31 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_32', 'Attendee 32', 'SoftSolutions', 'Software Engineer', 'Cloud Architecture', '32 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_33', 'Attendee 33', 'DeepMind', 'Tech Lead', 'Databases', '33 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_34', 'Attendee 34', 'Alphabet', 'Security Engineer', 'DevOps', '34 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_35', 'Attendee 35', 'TechCorp', 'DevOps Engineer', 'Cloud Architecture', '35 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_36', 'Attendee 36', 'DataSystems', 'Director of Engineering', 'Security', '36 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_37', 'Attendee 37', 'Google', 'Cloud Architect', 'Databases', '37 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_38', 'Attendee 38', 'Google', 'Product Manager', 'Security', '38 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_39', 'Attendee 39', 'SoftSolutions', 'Security Engineer', 'Cloud Architecture', '39 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_40', 'Attendee 40', 'Waymo', 'Director of Engineering', 'Cloud Architecture', '40 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_41', 'Attendee 41', 'SoftSolutions', 'Tech Lead', 'Security', '41 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_42', 'Attendee 42', 'DeepMind', 'Cloud Architect', 'Security', '42 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_43', 'Attendee 43', 'TechCorp', 'Cloud Architect', 'Databases', '43 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_44', 'Attendee 44', 'Alphabet', 'Security Engineer', 'AI & Machine Learning', '44 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_45', 'Attendee 45', 'CloudNative', 'Cloud Architect', 'AI & Machine Learning', '45 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_46', 'Attendee 46', 'CloudNative', 'Data Scientist', 'Security', '46 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_47', 'Attendee 47', 'DeepMind', 'Data Scientist', 'Security', '47 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_48', 'Attendee 48', 'Verily', 'DevOps Engineer', 'AI & Machine Learning', '48 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_49', 'Attendee 49', 'Verily', 'Director of Engineering', 'AI & Machine Learning', '49 Main St', 'CityVille', 'StateName', 'CountryName'),
('user_50', 'Attendee 50', 'Google', 'Director of Engineering', 'DevOps', '50 Main St', 'CityVille', 'StateName', 'CountryName') ON CONFLICT (username) DO NOTHING;
3.4 セッションを入力する
-- Insert Sessions
INSERT INTO public.session (session_id, session_name, full_description, session_format, learning_level, session_url, for_job_role, session_date, session_start_time, session_end_time, session_location, capacity, remaining_capacity, interest_area, industry) VALUES
('S001', 'AlloyDB Deep Dive: Advanced Performance Tuning', 'Learn how to squeeze every drop of performance out of AlloyDB. This session covers index tuning, memory management, and advanced query optimization techniques.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S001', 'Cloud Architect', '2026-04-11', '15:00:00', '15:00:00', 'Room C', 500, 192, 'Databases', 'Technology'),
('S002', 'Vector Search at Scale with ScaNN in AlloyDB', 'Discover how to use ScaNN for fast approximate nearest neighbor search in AlloyDB. Perfect for building high-scale recommendation systems.', 'Breakouts', 'Intermediate', 'http://sessions.com/S002', 'Cloud Architect', '2026-04-10', '14:00:00', '14:00:00', 'Auditorium', 100, 16, 'Databases', 'Retail'),
('S003', 'Building Gen AI Apps with Vertex AI and AlloyDB', 'A practical guide to integrating Vertex AI embeddings and LLMs with your operational data in AlloyDB to build intelligent applications.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S003', 'Director of Engineering', '2026-04-11', '11:00:00', '11:00:00', 'Auditorium', 50, 28, 'Databases', 'Healthcare'),
('S004', 'Spanner: Architecting for Global Consistency', 'Learn how Spanner achieves global scale without sacrificing strong consistency. We will cover multi-region deployment patterns.', 'Keynotes', 'Intermediate', 'http://sessions.com/S004', 'Cloud Architect', '2026-04-11', '11:00:00', '11:00:00', 'Room B', 500, 441, 'Databases', 'Healthcare'),
('S005', 'BigQuery + Vertex AI: Predictive Analytics Made Easy', 'See how to combine the power of BigQuery for data warehousing with Vertex AI for machine learning to build predictive models directly on your data.', 'Breakouts', 'Advanced', 'http://sessions.com/S005', 'Product Manager', '2026-04-11', '14:00:00', '14:00:00', 'Room C', 100, 96, 'AI & Machine Learning', 'Retail'),
('S006', 'Securing Your Data: Best Practices in AlloyDB', 'Deep dive into the security features of AlloyDB, including IAM integration, encryption at rest and in transit, and audit logging.', 'Keynotes', 'Beginner', 'http://sessions.com/S006', 'Product Manager', '2026-04-09', '15:00:00', '15:00:00', 'Room C', 200, 199, 'Databases', 'Healthcare'),
('S007', 'Kubernetes for Databases: Running PostgreSQL on GKE', 'Best practices for running stateful workloads like PostgreSQL on Google Kubernetes Engine (GKE).', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S007', 'Software Engineer', '2026-04-09', '16:00:00', '16:00:00', 'Room C', 100, 63, 'Databases', 'Retail'),
('S008', 'Real-time Analytics with BigQuery and Pub/Sub', 'Learn how to build real-time data pipelines using Pub/Sub and stream data directly into BigQuery for instant insights.', 'Keynotes', 'Beginner', 'http://sessions.com/S008', 'Security Engineer', '2026-04-10', '14:00:00', '14:00:00', 'Room C', 200, 65, 'Databases', 'Finance'),
('S009', 'Microservices Architecture with Spanner', 'How to design microservices that leverage Spanner''s unique capabilities for distributed transactions and scalability.', 'Keynotes', 'Beginner', 'http://sessions.com/S009', 'Software Engineer', '2026-04-11', '10:00:00', '10:00:00', 'Auditorium', 100, 25, 'Databases', 'Technology'),
('S010', 'AI-Powered Search with ScaNN and LLMs', 'Learn how to combine ScaNN vector search with Large Language Models to create powerful, context-aware search experiences.', 'Keynotes', 'Intermediate', 'http://sessions.com/S010', 'Tech Lead', '2026-04-11', '11:00:00', '11:00:00', 'Room C', 50, 27, 'AI & Machine Learning', 'Healthcare'),
('S011', 'AlloyDB Omni: Run AlloyDB Anywhere', 'Explore AlloyDB Omni, the downloadable edition of AlloyDB that lets you run the same high-performance database in your own data center or on the edge.', 'Breakouts', 'Intermediate', 'http://sessions.com/S011', 'Cloud Architect', '2026-04-09', '10:00:00', '10:00:00', 'Room B', 200, 195, 'Databases', 'Technology'),
('S012', 'Data Mesh on Google Cloud: Best Practices', 'How to implement a decentralized data mesh architecture using BigQuery, Dataplex, and other Google Cloud tools.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S012', 'Data Scientist', '2026-04-10', '16:00:00', '16:00:00', 'Room C', 100, 46, 'Cloud Architecture', 'Technology'),
('S013', 'Serverless Databases: When to use Cloud SQL vs AlloyDB', 'A comparison of Cloud SQL and AlloyDB, helping you choose the right database for your serverless and traditional applications.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S013', 'DevOps Engineer', '2026-04-10', '11:00:00', '11:00:00', 'Room C', 500, 458, 'Databases', 'Manufacturing'),
('S014', 'Graph Databases on Google Cloud', 'Explore options for graph data processing on Google Cloud, including integrations with existing database services.', 'Breakouts', 'Advanced', 'http://sessions.com/S014', 'DevOps Engineer', '2026-04-11', '09:00:00', '09:00:00', 'Room C', 500, 338, 'DevOps', 'Finance'),
('S015', 'Automating DB Ops with Gemini', 'See how Gemini can help DBA and developers write better SQL, optimize queries, and manage database infrastructure.', 'Breakouts', 'Advanced', 'http://sessions.com/S015', 'Cloud Architect', '2026-04-11', '14:00:00', '14:00:00', 'Room C', 100, 53, 'AI & Machine Learning', 'Retail'),
('S016', 'High Availability and Disaster Recovery in AlloyDB', 'A deep dive into how AlloyDB ensures your data is always available, covering failover mechanisms and backup strategies.', 'Breakouts', 'Advanced', 'http://sessions.com/S016', 'Cloud Architect', '2026-04-11', '11:00:00', '11:00:00', 'Room A', 200, 52, 'Databases', 'Technology'),
('S017', 'Optimizing Costs in BigQuery', 'Practical tips for reducing your BigQuery bill without sacrificing performance, covering slot management and query optimization.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S017', 'Security Engineer', '2026-04-11', '15:00:00', '15:00:00', 'Room B', 100, 65, 'Databases', 'Manufacturing'),
('S018', 'Continuous Integration for Database Schemas', 'How to apply CI/CD principles to database schema changes using tools like Liquibase or Flyway on Google Cloud.', 'Breakouts', 'Beginner', 'http://sessions.com/S018', 'Cloud Architect', '2026-04-11', '09:00:00', '09:00:00', 'Room B', 50, 30, 'Security', 'Technology'),
('S019', 'Data Governance in the Age of AI', 'Learn how to maintain data quality, privacy, and compliance when feeding enterprise data into AI models.', 'Breakouts', 'Beginner', 'http://sessions.com/S019', 'Product Manager', '2026-04-10', '10:00:00', '10:00:00', 'Room A', 100, 39, 'DevOps', 'Retail'),
('S020', 'Hybrid Search: Combining Vector and Keyword Search', 'Learn how to implement hybrid search in AlloyDB to get the best of both worlds: semantic understanding and precise keyword matching.', 'Breakouts', 'Intermediate', 'http://sessions.com/S020', 'Data Scientist', '2026-04-09', '14:00:00', '14:00:00', 'Auditorium', 500, 176, 'Databases', 'Manufacturing'),
('S021', 'Deep Dive into ScaNN for High Availability', 'Join this session to explore how ScaNN can be used for High Availability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S021', 'Software Engineer', '2026-04-11', '14:00:00', '14:00:00', 'Room B', 200, 18, 'AI & Machine Learning', 'Finance'),
('S022', 'Understanding Vertex AI for Modernization', 'Join this session to explore how Vertex AI can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S022', 'Tech Lead', '2026-04-09', '09:00:00', '09:00:00', 'Room A', 50, 48, 'AI & Machine Learning', 'Finance'),
('S023', 'Securing Vertex AI for Modernization', 'Join this session to explore how Vertex AI can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S023', 'Tech Lead', '2026-04-10', '10:00:00', '10:00:00', 'Auditorium', 200, 96, 'AI & Machine Learning', 'Manufacturing'),
('S024', 'Mastering Kubernetes for Security', 'Join this session to explore how Kubernetes can be used for Security. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S024', 'DevOps Engineer', '2026-04-09', '09:00:00', '09:00:00', 'Auditorium', 200, 160, 'Security', 'Technology'),
('S025', 'Mastering AlloyDB for Modernization', 'Join this session to explore how AlloyDB can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S025', 'Director of Engineering', '2026-04-11', '16:00:00', '16:00:00', 'Room B', 200, 74, 'Databases', 'Healthcare'),
('S026', 'Securing Vertex AI for Automation', 'Join this session to explore how Vertex AI can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S026', 'Cloud Architect', '2026-04-11', '16:00:00', '16:00:00', 'Room A', 50, 25, 'AI & Machine Learning', 'Manufacturing'),
('S027', 'Mastering BigQuery for Analytics', 'Join this session to explore how BigQuery can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S027', 'Security Engineer', '2026-04-11', '10:00:00', '10:00:00', 'Room B', 200, 117, 'Databases', 'Healthcare'),
('S028', 'Deep Dive into Spanner for Integration', 'Join this session to explore how Spanner can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S028', 'Tech Lead', '2026-04-09', '10:00:00', '10:00:00', 'Auditorium', 50, 32, 'Databases', 'Retail'),
('S029', 'Scaling Generative AI for Automation', 'Join this session to explore how Generative AI can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Intermediate', 'http://sessions.com/S029', 'Tech Lead', '2026-04-09', '10:00:00', '10:00:00', 'Room A', 200, 157, 'AI & Machine Learning', 'Healthcare'),
('S030', 'Deploying Generative AI for Analytics', 'Join this session to explore how Generative AI can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S030', 'Director of Engineering', '2026-04-09', '16:00:00', '16:00:00', 'Room B', 500, 462, 'DevOps', 'Healthcare'),
('S031', 'Mastering ScaNN for High Availability', 'Join this session to explore how ScaNN can be used for High Availability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S031', 'Director of Engineering', '2026-04-10', '09:00:00', '09:00:00', 'Room C', 500, 140, 'AI & Machine Learning', 'Finance'),
('S032', 'Deploying Kubernetes for Integration', 'Join this session to explore how Kubernetes can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S032', 'Cloud Architect', '2026-04-11', '14:00:00', '14:00:00', 'Auditorium', 200, 22, 'Databases', 'Retail'),
('S033', 'Securing Gemini for Performance', 'Join this session to explore how Gemini can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Intermediate', 'http://sessions.com/S033', 'Cloud Architect', '2026-04-09', '16:00:00', '16:00:00', 'Room B', 200, 84, 'AI & Machine Learning', 'Technology'),
('S034', 'Deploying Vertex AI for Scale', 'Join this session to explore how Vertex AI can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S034', 'Director of Engineering', '2026-04-10', '10:00:00', '10:00:00', 'Room B', 500, 222, 'AI & Machine Learning', 'Finance'),
('S035', 'Deep Dive into BigQuery for Analytics', 'Join this session to explore how BigQuery can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S035', 'Security Engineer', '2026-04-11', '15:00:00', '15:00:00', 'Room A', 500, 408, 'Databases', 'Healthcare'),
('S036', 'Deploying Kubernetes for Security', 'Join this session to explore how Kubernetes can be used for Security. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S036', 'Tech Lead', '2026-04-10', '09:00:00', '09:00:00', 'Room A', 200, 54, 'Security', 'Healthcare'),
('S037', 'Understanding Spanner for Integration', 'Join this session to explore how Spanner can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S037', 'Tech Lead', '2026-04-10', '14:00:00', '14:00:00', 'Room C', 200, 89, 'Databases', 'Technology'),
('S038', 'Deep Dive into Kubernetes for Automation', 'Join this session to explore how Kubernetes can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S038', 'Product Manager', '2026-04-11', '09:00:00', '09:00:00', 'Room C', 50, 47, 'AI & Machine Learning', 'Healthcare'),
('S039', 'Optimizing BigQuery for Reliability', 'Join this session to explore how BigQuery can be used for Reliability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S039', 'Director of Engineering', '2026-04-10', '14:00:00', '14:00:00', 'Auditorium', 200, 38, 'Databases', 'Retail'),
('S040', 'Deep Dive into Spanner for Cost Efficiency', 'Join this session to explore how Spanner can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S040', 'Software Engineer', '2026-04-09', '14:00:00', '14:00:00', 'Auditorium', 50, 2, 'Databases', 'Healthcare'),
('S041', 'Exploring Gemini for Cost Efficiency', 'Join this session to explore how Gemini can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Intermediate', 'http://sessions.com/S041', 'Product Manager', '2026-04-10', '15:00:00', '15:00:00', 'Room A', 100, 73, 'AI & Machine Learning', 'Healthcare'),
('S042', 'Mastering ScaNN for Performance', 'Join this session to explore how ScaNN can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S042', 'Tech Lead', '2026-04-09', '11:00:00', '11:00:00', 'Auditorium', 100, 50, 'AI & Machine Learning', 'Manufacturing'),
('S043', 'Mastering ScaNN for Analytics', 'Join this session to explore how ScaNN can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S043', 'Data Scientist', '2026-04-10', '09:00:00', '09:00:00', 'Room B', 200, 111, 'AI & Machine Learning', 'Technology'),
('S044', 'Securing Gemini for Integration', 'Join this session to explore how Gemini can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S044', 'Cloud Architect', '2026-04-09', '14:00:00', '14:00:00', 'Auditorium', 500, 281, 'AI & Machine Learning', 'Healthcare'),
('S045', 'Architecting Cloud SQL for Integration', 'Join this session to explore how Cloud SQL can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S045', 'Product Manager', '2026-04-11', '11:00:00', '11:00:00', 'Room C', 50, 6, 'AI & Machine Learning', 'Retail'),
('S046', 'Securing Kubernetes for Scale', 'Join this session to explore how Kubernetes can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S046', 'Security Engineer', '2026-04-11', '14:00:00', '14:00:00', 'Room B', 100, 80, 'AI & Machine Learning', 'Manufacturing'),
('S047', 'Mastering PostgreSQL for Integration', 'Join this session to explore how PostgreSQL can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S047', 'Tech Lead', '2026-04-10', '14:00:00', '14:00:00', 'Auditorium', 200, 134, 'Databases', 'Manufacturing'),
('S048', 'Deep Dive into Kubernetes for Cost Efficiency', 'Join this session to explore how Kubernetes can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S048', 'Data Scientist', '2026-04-11', '09:00:00', '09:00:00', 'Room C', 500, 102, 'AI & Machine Learning', 'Retail'),
('S049', 'Deep Dive into Cloud SQL for Scale', 'Join this session to explore how Cloud SQL can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S049', 'Security Engineer', '2026-04-09', '14:00:00', '14:00:00', 'Auditorium', 200, 127, 'AI & Machine Learning', 'Healthcare'),
('S050', 'Scaling Cloud SQL for Reliability', 'Join this session to explore how Cloud SQL can be used for Reliability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Intermediate', 'http://sessions.com/S050', 'Software Engineer', '2026-04-10', '15:00:00', '15:00:00', 'Room A', 100, 40, 'Cloud Architecture', 'Finance'),
('S051', 'Building Vertex AI for Security', 'Join this session to explore how Vertex AI can be used for Security. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S051', 'Director of Engineering', '2026-04-09', '15:00:00', '15:00:00', 'Room C', 500, 138, 'AI & Machine Learning', 'Retail'),
('S052', 'Exploring Vertex AI for Modernization', 'Join this session to explore how Vertex AI can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S052', 'DevOps Engineer', '2026-04-09', '09:00:00', '09:00:00', 'Room C', 200, 27, 'AI & Machine Learning', 'Finance'),
('S053', 'Optimizing Generative AI for Automation', 'Join this session to explore how Generative AI can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S053', 'Director of Engineering', '2026-04-10', '11:00:00', '11:00:00', 'Room C', 500, 65, 'Databases', 'Healthcare'),
('S054', 'Architecting PostgreSQL for Performance', 'Join this session to explore how PostgreSQL can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S054', 'Data Scientist', '2026-04-09', '11:00:00', '11:00:00', 'Auditorium', 200, 103, 'Databases', 'Healthcare'),
('S055', 'Mastering Generative AI for Automation', 'Join this session to explore how Generative AI can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S055', 'Data Scientist', '2026-04-11', '11:00:00', '11:00:00', 'Room C', 50, 31, 'AI & Machine Learning', 'Technology'),
('S056', 'Exploring ScaNN for Reliability', 'Join this session to explore how ScaNN can be used for Reliability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S056', 'Security Engineer', '2026-04-11', '15:00:00', '15:00:00', 'Room A', 500, 351, 'AI & Machine Learning', 'Healthcare'),
('S057', 'Deep Dive into BigQuery for Performance', 'Join this session to explore how BigQuery can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S057', 'DevOps Engineer', '2026-04-11', '11:00:00', '11:00:00', 'Room B', 200, 200, 'Databases', 'Finance'),
('S058', 'Scaling Generative AI for Reliability', 'Join this session to explore how Generative AI can be used for Reliability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S058', 'Cloud Architect', '2026-04-10', '11:00:00', '11:00:00', 'Room C', 100, 61, 'Databases', 'Finance'),
('S059', 'Securing Vertex AI for High Availability', 'Join this session to explore how Vertex AI can be used for High Availability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S059', 'Data Scientist', '2026-04-11', '16:00:00', '16:00:00', 'Room B', 500, 224, 'AI & Machine Learning', 'Manufacturing'),
('S060', 'Architecting AlloyDB for Integration', 'Join this session to explore how AlloyDB can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S060', 'Tech Lead', '2026-04-09', '14:00:00', '14:00:00', 'Room A', 500, 223, 'Databases', 'Technology'),
('S061', 'Understanding Spanner for High Availability', 'Join this session to explore how Spanner can be used for High Availability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S061', 'Tech Lead', '2026-04-09', '16:00:00', '16:00:00', 'Room C', 100, 52, 'Databases', 'Manufacturing'),
('S062', 'Scaling Kubernetes for Cost Efficiency', 'Join this session to explore how Kubernetes can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S062', 'Product Manager', '2026-04-10', '16:00:00', '16:00:00', 'Room B', 100, 0, 'Cloud Architecture', 'Retail'),
('S063', 'Architecting Kubernetes for High Availability', 'Join this session to explore how Kubernetes can be used for High Availability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S063', 'Security Engineer', '2026-04-09', '10:00:00', '10:00:00', 'Auditorium', 200, 0, 'Security', 'Finance'),
('S064', 'Mastering Gemini for Integration', 'Join this session to explore how Gemini can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S064', 'Security Engineer', '2026-04-10', '15:00:00', '15:00:00', 'Room B', 100, 8, 'AI & Machine Learning', 'Technology'),
('S065', 'Optimizing Generative AI for Security', 'Join this session to explore how Generative AI can be used for Security. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S065', 'Tech Lead', '2026-04-09', '15:00:00', '15:00:00', 'Room C', 500, 230, 'AI & Machine Learning', 'Retail'),
('S066', 'Optimizing BigQuery for Scale', 'Join this session to explore how BigQuery can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Intermediate', 'http://sessions.com/S066', 'Tech Lead', '2026-04-11', '10:00:00', '10:00:00', 'Room C', 500, 186, 'Databases', 'Healthcare'),
('S067', 'Scaling PostgreSQL for Automation', 'Join this session to explore how PostgreSQL can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S067', 'Product Manager', '2026-04-10', '11:00:00', '11:00:00', 'Auditorium', 100, 17, 'Databases', 'Retail'),
('S068', 'Exploring AlloyDB for Automation', 'Join this session to explore how AlloyDB can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S068', 'Director of Engineering', '2026-04-11', '16:00:00', '16:00:00', 'Room B', 100, 77, 'Databases', 'Retail'),
('S069', 'Securing BigQuery for Cost Efficiency', 'Join this session to explore how BigQuery can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S069', 'Cloud Architect', '2026-04-09', '14:00:00', '14:00:00', 'Room A', 500, 437, 'Databases', 'Manufacturing'),
('S070', 'Deep Dive into Kubernetes for Integration', 'Join this session to explore how Kubernetes can be used for Integration. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S070', 'Cloud Architect', '2026-04-11', '11:00:00', '11:00:00', 'Room A', 50, 46, 'AI & Machine Learning', 'Technology'),
('S071', 'Architecting ScaNN for Cost Efficiency', 'Join this session to explore how ScaNN can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S071', 'Cloud Architect', '2026-04-11', '14:00:00', '14:00:00', 'Auditorium', 100, 97, 'AI & Machine Learning', 'Finance'),
('S072', 'Scaling ScaNN for Analytics', 'Join this session to explore how ScaNN can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S072', 'Cloud Architect', '2026-04-09', '11:00:00', '11:00:00', 'Room C', 100, 96, 'AI & Machine Learning', 'Manufacturing'),
('S073', 'Securing Cloud SQL for Modernization', 'Join this session to explore how Cloud SQL can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S073', 'Tech Lead', '2026-04-10', '16:00:00', '16:00:00', 'Room C', 200, 195, 'Security', 'Technology'),
('S074', 'Deploying ScaNN for Scale', 'Join this session to explore how ScaNN can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S074', 'Data Scientist', '2026-04-10', '10:00:00', '10:00:00', 'Room A', 500, 215, 'AI & Machine Learning', 'Technology'),
('S075', 'Architecting BigQuery for Automation', 'Join this session to explore how BigQuery can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S075', 'Product Manager', '2026-04-09', '09:00:00', '09:00:00', 'Room A', 200, 110, 'Databases', 'Healthcare'),
('S076', 'Understanding Vertex AI for Scale', 'Join this session to explore how Vertex AI can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S076', 'Software Engineer', '2026-04-11', '15:00:00', '15:00:00', 'Room B', 200, 15, 'AI & Machine Learning', 'Finance'),
('S077', 'Architecting PostgreSQL for Reliability', 'Join this session to explore how PostgreSQL can be used for Reliability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S077', 'Director of Engineering', '2026-04-09', '11:00:00', '11:00:00', 'Room C', 200, 133, 'Databases', 'Finance'),
('S078', 'Deploying Generative AI for Analytics', 'Join this session to explore how Generative AI can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S078', 'Product Manager', '2026-04-11', '16:00:00', '16:00:00', 'Room A', 200, 190, 'AI & Machine Learning', 'Manufacturing'),
('S079', 'Deploying ScaNN for Analytics', 'Join this session to explore how ScaNN can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S079', 'Cloud Architect', '2026-04-11', '16:00:00', '16:00:00', 'Room B', 200, 95, 'AI & Machine Learning', 'Technology'),
('S080', 'Securing Spanner for Security', 'Join this session to explore how Spanner can be used for Security. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S080', 'Tech Lead', '2026-04-11', '14:00:00', '14:00:00', 'Room A', 500, 310, 'Databases', 'Healthcare'),
('S081', 'Optimizing Cloud SQL for Performance', 'Join this session to explore how Cloud SQL can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S081', 'Security Engineer', '2026-04-11', '11:00:00', '11:00:00', 'Room B', 100, 76, 'Databases', 'Finance'),
('S082', 'Exploring Spanner for Cost Efficiency', 'Join this session to explore how Spanner can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S082', 'Tech Lead', '2026-04-11', '15:00:00', '15:00:00', 'Room C', 50, 1, 'Databases', 'Manufacturing'),
('S083', 'Understanding Kubernetes for Performance', 'Join this session to explore how Kubernetes can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S083', 'Product Manager', '2026-04-11', '14:00:00', '14:00:00', 'Auditorium', 100, 49, 'Security', 'Retail'),
('S084', 'Exploring Cloud SQL for Cost Efficiency', 'Join this session to explore how Cloud SQL can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S084', 'Tech Lead', '2026-04-09', '16:00:00', '16:00:00', 'Room C', 500, 91, 'Cloud Architecture', 'Healthcare'),
('S085', 'Scaling Kubernetes for Automation', 'Join this session to explore how Kubernetes can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Intermediate', 'http://sessions.com/S085', 'Director of Engineering', '2026-04-10', '10:00:00', '10:00:00', 'Room B', 500, 204, 'Databases', 'Finance'),
('S086', 'Deep Dive into BigQuery for Cost Efficiency', 'Join this session to explore how BigQuery can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S086', 'Product Manager', '2026-04-09', '16:00:00', '16:00:00', 'Room B', 100, 89, 'Databases', 'Finance'),
('S087', 'Deep Dive into Vertex AI for Automation', 'Join this session to explore how Vertex AI can be used for Automation. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S087', 'Data Scientist', '2026-04-10', '14:00:00', '14:00:00', 'Auditorium', 100, 74, 'AI & Machine Learning', 'Retail'),
('S088', 'Mastering AlloyDB for Modernization', 'Join this session to explore how AlloyDB can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S088', 'Security Engineer', '2026-04-09', '16:00:00', '16:00:00', 'Room C', 100, 39, 'Databases', 'Healthcare'),
('S089', 'Exploring AlloyDB for High Availability', 'Join this session to explore how AlloyDB can be used for High Availability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S089', 'Data Scientist', '2026-04-10', '15:00:00', '15:00:00', 'Room A', 100, 94, 'Databases', 'Healthcare'),
('S090', 'Exploring Vertex AI for Security', 'Join this session to explore how Vertex AI can be used for Security. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Intermediate', 'http://sessions.com/S090', 'Security Engineer', '2026-04-11', '10:00:00', '10:00:00', 'Room B', 50, 27, 'AI & Machine Learning', 'Retail'),
('S091', 'Mastering ScaNN for Cost Efficiency', 'Join this session to explore how ScaNN can be used for Cost Efficiency. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S091', 'DevOps Engineer', '2026-04-09', '14:00:00', '14:00:00', 'Auditorium', 100, 21, 'AI & Machine Learning', 'Technology'),
('S092', 'Mastering BigQuery for Scale', 'Join this session to explore how BigQuery can be used for Scale. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Advanced', 'http://sessions.com/S092', 'Cloud Architect', '2026-04-09', '16:00:00', '16:00:00', 'Room C', 200, 67, 'Databases', 'Manufacturing'),
('S093', 'Exploring AlloyDB for Performance', 'Join this session to explore how AlloyDB can be used for Performance. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S093', 'Security Engineer', '2026-04-09', '10:00:00', '10:00:00', 'Room B', 200, 171, 'Databases', 'Finance'),
('S094', 'Deploying Cloud SQL for Modernization', 'Join this session to explore how Cloud SQL can be used for Modernization. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Advanced', 'http://sessions.com/S094', 'Product Manager', '2026-04-09', '14:00:00', '14:00:00', 'Room B', 100, 71, 'DevOps', 'Healthcare'),
('S095', 'Building Spanner for Analytics', 'Join this session to explore how Spanner can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S095', 'Product Manager', '2026-04-10', '15:00:00', '15:00:00', 'Room B', 500, 334, 'Databases', 'Manufacturing'),
('S096', 'Deep Dive into Vertex AI for Analytics', 'Join this session to explore how Vertex AI can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Intermediate', 'http://sessions.com/S096', 'DevOps Engineer', '2026-04-11', '14:00:00', '14:00:00', 'Room C', 100, 27, 'AI & Machine Learning', 'Healthcare'),
('S097', 'Deploying PostgreSQL for Analytics', 'Join this session to explore how PostgreSQL can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Breakouts', 'Beginner', 'http://sessions.com/S097', 'Cloud Architect', '2026-04-09', '11:00:00', '11:00:00', 'Room C', 50, 36, 'Databases', 'Healthcare'),
('S098', 'Architecting Kubernetes for Reliability', 'Join this session to explore how Kubernetes can be used for Reliability. We will cover best practices, real-world use cases, and advanced configuration options.', 'Lightning Talks', 'Beginner', 'http://sessions.com/S098', 'Cloud Architect', '2026-04-10', '11:00:00', '11:00:00', 'Room A', 50, 29, 'AI & Machine Learning', 'Finance'),
('S099', 'Scaling Cloud SQL for Analytics', 'Join this session to explore how Cloud SQL can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Beginner', 'http://sessions.com/S099', 'DevOps Engineer', '2026-04-09', '09:00:00', '09:00:00', 'Auditorium', 50, 21, 'Security', 'Finance'),
('S100', 'Deploying PostgreSQL for Analytics', 'Join this session to explore how PostgreSQL can be used for Analytics. We will cover best practices, real-world use cases, and advanced configuration options.', 'Keynotes', 'Advanced', 'http://sessions.com/S100', 'DevOps Engineer', '2026-04-11', '09:00:00', '09:00:00', 'Room B', 500, 141, 'Databases', 'Technology') ON CONFLICT (session_id) DO NOTHING;
3.5 セッションにスピーカーを割り当てる
-- Insert Session-Speaker Mappings
INSERT INTO public.session_speaker_mapping (session_id, speaker_id) VALUES
('S001', 6),
('S001', 19),
('S002', 6),
('S002', 11),
('S003', 14),
('S003', 10),
('S004', 5),
('S004', 8),
('S005', 12),
('S005', 9),
('S006', 14),
('S007', 14),
('S007', 3),
('S008', 2),
('S008', 4),
('S009', 9),
('S009', 13),
('S010', 2),
('S010', 3),
('S011', 12),
('S012', 13),
('S013', 11),
('S014', 8),
('S015', 16),
('S016', 4),
('S016', 18),
('S017', 12),
('S018', 10),
('S019', 15),
('S020', 20),
('S020', 7),
('S021', 2),
('S021', 11),
('S022', 15),
('S022', 7),
('S023', 4),
('S023', 19),
('S024', 11),
('S025', 11),
('S025', 10),
('S026', 11),
('S027', 20),
('S028', 20),
('S028', 3),
('S029', 11),
('S029', 20),
('S030', 19),
('S030', 6),
('S031', 20),
('S031', 14),
('S032', 3),
('S033', 4),
('S033', 8),
('S034', 14),
('S035', 12),
('S035', 4),
('S036', 18),
('S037', 6),
('S038', 9),
('S038', 7),
('S039', 7),
('S040', 17),
('S041', 17),
('S042', 16),
('S042', 2),
('S043', 10),
('S043', 13),
('S044', 7),
('S045', 10),
('S046', 1),
('S046', 20),
('S047', 17),
('S048', 9),
('S048', 6),
('S049', 4),
('S049', 3),
('S050', 8),
('S050', 16),
('S051', 18),
('S051', 10),
('S052', 4),
('S053', 5),
('S053', 13),
('S054', 17),
('S055', 1),
('S056', 1),
('S056', 15),
('S057', 7),
('S058', 15),
('S059', 15),
('S059', 8),
('S060', 20),
('S060', 10),
('S061', 16),
('S062', 18),
('S062', 11),
('S063', 10),
('S064', 6),
('S065', 10),
('S066', 8),
('S066', 9),
('S067', 16),
('S067', 14),
('S068', 13),
('S068', 11),
('S069', 16),
('S070', 8),
('S071', 3),
('S072', 10),
('S072', 1),
('S073', 10),
('S073', 8),
('S074', 20),
('S074', 14),
('S075', 5),
('S076', 1),
('S076', 11),
('S077', 3),
('S078', 20),
('S078', 12),
('S079', 17),
('S079', 9),
('S080', 10),
('S081', 2),
('S082', 15),
('S082', 11),
('S083', 7),
('S083', 1),
('S084', 8),
('S085', 8),
('S085', 18),
('S086', 5),
('S087', 5),
('S088', 19),
('S088', 18),
('S089', 18),
('S090', 8),
('S091', 4),
('S092', 14),
('S093', 20),
('S093', 17),
('S094', 16),
('S094', 9),
('S095', 11),
('S095', 4),
('S096', 14),
('S096', 11),
('S097', 13),
('S097', 19),
('S098', 3),
('S099', 11),
('S099', 18),
('S100', 18),
('S100', 13) ON CONFLICT DO NOTHING;
3.6 セッションにトピックを添付する
-- Insert Session-Topic Mappings
INSERT INTO public.session_topic_mapping (session_id, topic) VALUES
('S001', 'Security'),
('S002', 'AI & Machine Learning'),
('S003', 'Cloud Architecture'),
('S003', 'AI & Machine Learning'),
('S004', 'Databases'),
('S004', 'DevOps'),
('S005', 'DevOps'),
('S005', 'Cloud Architecture'),
('S006', 'Security'),
('S006', 'AI & Machine Learning'),
('S007', 'Cloud Architecture'),
('S007', 'Databases'),
('S008', 'AI & Machine Learning'),
('S008', 'Databases'),
('S009', 'Security'),
('S009', 'DevOps'),
('S010', 'AI & Machine Learning'),
('S010', 'Cloud Architecture'),
('S011', 'Security'),
('S012', 'Databases'),
('S013', 'Cloud Architecture'),
('S014', 'Databases'),
('S015', 'DevOps'),
('S015', 'Security'),
('S016', 'AI & Machine Learning'),
('S016', 'Databases'),
('S017', 'Cloud Architecture'),
('S018', 'AI & Machine Learning'),
('S019', 'AI & Machine Learning'),
('S020', 'Security'),
('S021', 'Security'),
('S021', 'Databases'),
('S022', 'Security'),
('S022', 'Databases'),
('S023', 'DevOps'),
('S023', 'AI & Machine Learning'),
('S024', 'AI & Machine Learning'),
('S025', 'Databases'),
('S026', 'DevOps'),
('S027', 'DevOps'),
('S027', 'Cloud Architecture'),
('S028', 'DevOps'),
('S029', 'Databases'),
('S029', 'Security'),
('S030', 'DevOps'),
('S030', 'Security'),
('S031', 'Databases'),
('S032', 'Databases'),
('S033', 'Databases'),
('S034', 'AI & Machine Learning'),
('S035', 'Security'),
('S035', 'AI & Machine Learning'),
('S036', 'AI & Machine Learning'),
('S036', 'Databases'),
('S037', 'DevOps'),
('S037', 'Databases'),
('S038', 'Cloud Architecture'),
('S038', 'Security'),
('S039', 'Security'),
('S040', 'Security'),
('S040', 'AI & Machine Learning'),
('S041', 'AI & Machine Learning'),
('S042', 'Databases'),
('S043', 'AI & Machine Learning'),
('S043', 'Databases'),
('S044', 'Databases'),
('S044', 'DevOps'),
('S045', 'DevOps'),
('S045', 'Cloud Architecture'),
('S046', 'Cloud Architecture'),
('S046', 'Security'),
('S047', 'Cloud Architecture'),
('S047', 'Security'),
('S048', 'Databases'),
('S049', 'AI & Machine Learning'),
('S049', 'Databases'),
('S050', 'Cloud Architecture'),
('S050', 'AI & Machine Learning'),
('S051', 'DevOps'),
('S051', 'Databases'),
('S052', 'Databases'),
('S053', 'DevOps'),
('S053', 'Databases'),
('S054', 'Security'),
('S054', 'DevOps'),
('S055', 'AI & Machine Learning'),
('S056', 'Security'),
('S056', 'DevOps'),
('S057', 'AI & Machine Learning'),
('S058', 'Security'),
('S058', 'AI & Machine Learning'),
('S059', 'Security'),
('S060', 'AI & Machine Learning'),
('S060', 'DevOps'),
('S061', 'Security'),
('S061', 'AI & Machine Learning'),
('S062', 'DevOps'),
('S063', 'Security'),
('S063', 'DevOps'),
('S064', 'Databases'),
('S064', 'AI & Machine Learning'),
('S065', 'DevOps'),
('S066', 'AI & Machine Learning'),
('S066', 'Cloud Architecture'),
('S067', 'AI & Machine Learning'),
('S068', 'Security'),
('S069', 'Cloud Architecture'),
('S069', 'DevOps'),
('S070', 'AI & Machine Learning'),
('S071', 'AI & Machine Learning'),
('S071', 'DevOps'),
('S072', 'DevOps'),
('S072', 'Security'),
('S073', 'Security'),
('S074', 'AI & Machine Learning'),
('S074', 'Databases'),
('S075', 'AI & Machine Learning'),
('S076', 'DevOps'),
('S077', 'DevOps'),
('S077', 'AI & Machine Learning'),
('S078', 'Databases'),
('S079', 'Databases'),
('S080', 'AI & Machine Learning'),
('S080', 'Databases'),
('S081', 'Databases'),
('S082', 'Databases'),
('S083', 'Security'),
('S084', 'Security'),
('S084', 'AI & Machine Learning'),
('S085', 'AI & Machine Learning'),
('S085', 'Databases'),
('S086', 'DevOps'),
('S087', 'Databases'),
('S088', 'Security'),
('S088', 'Databases'),
('S089', 'Databases'),
('S090', 'DevOps'),
('S091', 'Databases'),
('S092', 'Databases'),
('S093', 'Security'),
('S093', 'AI & Machine Learning'),
('S094', 'Cloud Architecture'),
('S095', 'Cloud Architecture'),
('S095', 'AI & Machine Learning'),
('S096', 'AI & Machine Learning'),
('S097', 'Security'),
('S097', 'AI & Machine Learning'),
('S098', 'Databases'),
('S098', 'Security'),
('S099', 'Cloud Architecture'),
('S100', 'DevOps'),
('S100', 'Cloud Architecture') ON CONFLICT DO NOTHING;;
3.7 セッションに参加者を割り当てる
-- Insert Attendee-Session Mappings
INSERT INTO public.attendees_sessions (username, session_id) VALUES
('user_1', 'S100'),
('user_1', 'S008'),
('user_1', 'S060'),
('user_1', 'S090'),
('user_1', 'S057'),
('user_2', 'S086'),
('user_2', 'S033'),
('user_2', 'S006'),
('user_2', 'S043'),
('user_2', 'S050'),
('user_3', 'S066'),
('user_3', 'S099'),
('user_4', 'S004'),
('user_4', 'S043'),
('user_4', 'S092'),
('user_4', 'S033'),
('user_4', 'S074'),
('user_5', 'S014'),
('user_5', 'S088'),
('user_5', 'S093'),
('user_6', 'S075'),
('user_6', 'S033'),
('user_7', 'S014'),
('user_7', 'S021'),
('user_7', 'S047'),
('user_8', 'S051'),
('user_8', 'S081'),
('user_9', 'S048'),
('user_9', 'S100'),
('user_10', 'S037'),
('user_10', 'S059'),
('user_10', 'S083'),
('user_11', 'S007'),
('user_11', 'S099'),
('user_11', 'S054'),
('user_12', 'S006'),
('user_12', 'S046'),
('user_12', 'S077'),
('user_12', 'S032'),
('user_13', 'S020'),
('user_13', 'S029'),
('user_13', 'S054'),
('user_14', 'S052'),
('user_14', 'S070'),
('user_14', 'S028'),
('user_15', 'S054'),
('user_15', 'S050'),
('user_15', 'S025'),
('user_15', 'S066'),
('user_15', 'S081'),
('user_16', 'S099'),
('user_16', 'S073'),
('user_16', 'S027'),
('user_16', 'S058'),
('user_17', 'S092'),
('user_17', 'S089'),
('user_17', 'S076'),
('user_17', 'S062'),
('user_18', 'S083'),
('user_18', 'S094'),
('user_18', 'S097'),
('user_18', 'S031'),
('user_18', 'S040'),
('user_19', 'S078'),
('user_19', 'S072'),
('user_19', 'S049'),
('user_19', 'S017'),
('user_19', 'S084'),
('user_20', 'S023'),
('user_20', 'S003'),
('user_20', 'S016'),
('user_20', 'S068'),
('user_21', 'S071'),
('user_21', 'S058'),
('user_21', 'S043'),
('user_21', 'S079'),
('user_21', 'S067'),
('user_22', 'S076'),
('user_22', 'S038'),
('user_22', 'S049'),
('user_22', 'S033'),
('user_22', 'S070'),
('user_23', 'S032'),
('user_23', 'S099'),
('user_24', 'S022'),
('user_24', 'S065'),
('user_24', 'S060'),
('user_24', 'S084'),
('user_25', 'S077'),
('user_25', 'S080'),
('user_25', 'S097'),
('user_25', 'S010'),
('user_26', 'S063'),
('user_26', 'S052'),
('user_26', 'S086'),
('user_27', 'S054'),
('user_27', 'S094'),
('user_27', 'S018'),
('user_27', 'S061'),
('user_27', 'S052'),
('user_28', 'S064'),
('user_28', 'S070'),
('user_28', 'S050'),
('user_29', 'S009'),
('user_29', 'S012'),
('user_30', 'S058'),
('user_30', 'S056'),
('user_30', 'S072'),
('user_30', 'S093'),
('user_30', 'S045'),
('user_31', 'S001'),
('user_31', 'S094'),
('user_31', 'S065'),
('user_31', 'S031'),
('user_32', 'S048'),
('user_32', 'S011'),
('user_32', 'S065'),
('user_33', 'S021'),
('user_33', 'S081'),
('user_33', 'S063'),
('user_34', 'S068'),
('user_34', 'S026'),
('user_35', 'S044'),
('user_35', 'S054'),
('user_36', 'S023'),
('user_36', 'S051'),
('user_36', 'S100'),
('user_37', 'S047'),
('user_37', 'S053'),
('user_37', 'S057'),
('user_37', 'S048'),
('user_37', 'S080'),
('user_38', 'S003'),
('user_38', 'S038'),
('user_38', 'S046'),
('user_38', 'S005'),
('user_38', 'S076'),
('user_39', 'S046'),
('user_39', 'S020'),
('user_39', 'S043'),
('user_39', 'S002'),
('user_39', 'S100'),
('user_40', 'S019'),
('user_40', 'S098'),
('user_40', 'S053'),
('user_40', 'S007'),
('user_41', 'S100'),
('user_41', 'S032'),
('user_41', 'S048'),
('user_41', 'S064'),
('user_42', 'S086'),
('user_42', 'S030'),
('user_42', 'S049'),
('user_43', 'S033'),
('user_43', 'S008'),
('user_43', 'S049'),
('user_43', 'S093'),
('user_44', 'S078'),
('user_44', 'S071'),
('user_44', 'S067'),
('user_44', 'S012'),
('user_45', 'S043'),
('user_45', 'S056'),
('user_45', 'S079'),
('user_45', 'S062'),
('user_45', 'S039'),
('user_46', 'S054'),
('user_46', 'S031'),
('user_46', 'S018'),
('user_47', 'S035'),
('user_47', 'S100'),
('user_47', 'S083'),
('user_47', 'S080'),
('user_47', 'S037'),
('user_48', 'S097'),
('user_48', 'S026'),
('user_48', 'S065'),
('user_48', 'S030'),
('user_48', 'S074'),
('user_49', 'S022'),
('user_49', 'S089'),
('user_49', 'S038'),
('user_49', 'S047'),
('user_49', 'S073'),
('user_50', 'S074'),
('user_50', 'S033'),
('user_50', 'S069'),
('user_50', 'S036') ON CONFLICT DO NOTHING;
実行が成功したことを示す出力が表示されます。テーブルにデータが入力されていることを確認します。たとえば、セッション テーブルに 100 個のセッションがあることを確認します。
SELECT count(*) from public.session;
7. AI クエリエンジンを有効にする
AI 関数を使用する前に、データベースで AI クエリエンジンを有効にする必要があります。
AlloyDB Studio(conference_db コンテキスト)で次の SQL を実行します。
CREATE EXTENSION IF NOT EXISTS google_ml_integration CASCADE;
ALTER DATABASE conference_db SET google_ml_integration.enable_ai_query_engine = 'on';
拡張機能が有効になっていることを確認します。
SELECT extversion FROM pg_extension WHERE extname = 'google_ml_integration';
出力には 1.5.9 以降が表示されます。
8. AI 関数(演算子)を使用する
次に、ai.if 関数と ai.rank 関数を使用して、AI によるセマンティック フィルタリングとスコアリングを行います。
ai.if を使用したセマンティック フィルタリング
キーワードが正確に存在しない場合、標準のテキスト マッチングではセッションが見つからないことがあります。ai.if を使用して「生成 AI」に関するセッションを見つけてみましょう。
AlloyDB Studio で次の SQL を実行します。
SELECT session_name, full_description
FROM public.session
WHERE
ai.if(
prompt => 'Is this session description about Generative AI, LLMs or AI agents? ' || full_description
);
異なる用語を使用している場合でも、関連するセッションが結果に表示されます。
ai.rank を使用したセマンティック スコアリング
初心者向けかどうかでセッションをスコアリングしてみましょう。セマンティック スコアリングには ai.rank を使用できます。
次の SQL を実行します。
SELECT session_name, full_description,
ai.rank(
prompt => 'On a scale of 0 to 1, how suitable is this session for a beginner? 1 being very suitable, 0 being advanced. Session: ' || full_description
) as beginner_friendly_score
FROM public.session
ORDER BY beginner_friendly_score DESC;
これは、会議の参加者向けに、プロフィールに基づいてパーソナライズされたおすすめを作成する場合に便利です。
9. ハイブリッド検索を実装する
ハイブリッド検索では、キーワード検索(語彙)の精度とベクトル検索(セマンティック)のコンテキスト理解を組み合わせます。両方のインデックスを作成し、Reciprocal Rank Fusion(RRF)を使用して結果を統合します。
スキャンを有効にする
scann 拡張機能と rum 拡張機能が有効になっていることを確認します。
CREATE EXTENSION IF NOT EXISTS alloydb_scann;
CREATE EXTENSION IF NOT EXISTS rum;
インデックスを作成する
スキーマでは、エンベディングに生成された列 (full_description_embedding)を使用しているため、挿入時に自動的に計算されます。高速取得のために適切なインデックスを作成するだけで済みます。
全文キーワード検索用のRUM インデックス (FTS インデックス)と、高速ベクトル類似性検索用のScaNN インデックス を作成します。
AlloyDB Studio で次の SQL を実行します。
-- Create RUM index for text search on session descriptions
CREATE INDEX session_text_idx ON public.session USING RUM (description_tsvector rum_tsvector_ops);
-- Create ScaNN index for vector search on session embeddings
CREATE INDEX session_vector_idx ON public.session
USING scann (full_description_embedding cosine)
WITH (num_leaves=10);
RRF でハイブリッド検索を実行する
次に、fast similarity search のセッションを検索しますが、AlloyDB の ScaNN に焦点を当てます。
セマンティック検索とキーワード検索を使用し、RRF を使用して結果を統合します。
次の SQL を実行します。
-- Enable preview features for the AI Query Engine if not already set
SET google_ml_integration.enable_preview_ai_functions = true;
SELECT s.session_id, s.session_name, s.full_description
FROM public.session s
JOIN ai.hybrid_search(
search_inputs => ARRAY[
'{
"data_type": "vector",
"table_name": "session",
"key_column": "session_id",
"vec_column": "full_description_embedding",
"distance_operator": "public.<=>",
"limit": 5,
"query_vector": "ai.embedding(''text-embedding-005'', ''fast similarity search'')::vector"
}'::JSONB,
'{
"data_type": "text",
"table_name": "session",
"key_column": "session_id",
"text_column": "description_tsvector",
"limit": 5,
"ranking_function": "<=>",
"query_text_input": "ScaNN"
}'::JSONB
]
) AS search_results
on s.session_id = search_results.id;
関連するセッションの類似性検索が表示され、ほとんどの結果に ScaNN 関連のセッションが表示されます。
10. AlloyDB Studio で QueryData を使用する
AlloyDB AI を使用すると、QueryData を使用して、自然言語入力から正確で予測可能な SQL ステートメントを生成できます。このセクションでは、QueryData コンテキスト(テンプレート)を作成し、AlloyDB Studio で直接テストする方法について説明します。
QueryData コンテキストを作成する
QueryData コンテキストは、クエリ テンプレートとファセットを含む JSON ファイルです。これにより、AI モデルが正しい SQL クエリまたは SQL クエリ部分を使用するために必要なデータと指示が提供されます。
会議スキーマ用に設計された JSON コンテキストの例を見てみましょう。テーブル名がスキーマ(public.session など)と一致していることを確認します。
使用する JSON コンテンツを次に示します。ノートパソコンまたはパソコンのローカル .json ファイルに保存します 。
{
"templates": [
{
"nlQuery": "Advanced sessions that are almost full",
"sql": "SELECT session_name, remaining_capacity, session_date, session_start_time FROM session WHERE learning_level = 'Advanced' AND remaining_capacity > 0 AND remaining_capacity < 5 ORDER BY remaining_capacity ASC",
"intent": "Advanced sessions that are almost full (remaining capacity less than 5)",
"manifest": "Advanced sessions that are almost full (remaining capacity less than 5)",
"parameterized": {
"parameterized_intent": "$1 sessions that are almost full (remaining capacity less than 5)",
"parameterized_sql": "SELECT session_name, remaining_capacity, session_date, session_start_time FROM public.session WHERE learning_level = $1 AND remaining_capacity > 0 AND remaining_capacity < 5 ORDER BY remaining_capacity ASC"
}
},
{
"nlQuery": "Find sessions about Gemini",
"sql": "SELECT name, format, session_date, description FROM ((SELECT s1.session_name AS name, s1.session_format AS format, s1.session_date AS session_date, s1.full_description AS description, (s1.full_description_embedding <=> public.embedding('text-embedding-005', 'Gemini')::public.vector) AS distance FROM public.session s1 ORDER BY distance LIMIT 10) UNION ALL (SELECT s2.session_name AS name, s2.session_format AS format, s2.session_date AS session_date, t.topic_desc AS description, (t.embedding <=> public.embedding('text-embedding-005', 'Gemini')::public.vector) AS distance FROM public.session s2 INNER JOIN public.session_topic_mapping stm ON s2.session_id = stm.session_id INNER JOIN public.session_topic t ON stm.topic = t.topic ORDER BY distance LIMIT 10)) AS combined_results ORDER BY distance LIMIT 10",
"intent": "Find sessions about Gemini",
"manifest": "Find sessions about a given topic",
"parameterized": {
"parameterized_intent": "Find sessions about $1",
"parameterized_sql": "SELECT name, format, session_date, description FROM ((SELECT s1.session_name AS name, s1.session_format AS format, s1.session_date AS session_date, s1.full_description AS description, (s1.full_description_embedding <=> public.embedding('text-embedding-005', '$1')::public.vector) AS distance FROM public.session s1 ORDER BY distance LIMIT 10) UNION ALL (SELECT s2.session_name AS name, s2.session_format AS format, s2.session_date AS session_date, t.topic_desc AS description, (t.embedding <=> public.embedding('text-embedding-005', '$1')::public.vector) AS distance FROM public.session s2 INNER JOIN public.session_topic_mapping stm ON s2.session_id = stm.session_id INNER JOIN public.session_topic t ON stm.topic = t.topic ORDER BY distance LIMIT 10)) AS combined_results ORDER BY distance LIMIT 10"
}
}
]
}
AlloyDB Studio に QueryData コンテキストを読み込む
Query Data コンテキストを使用するには、AlloyDB Studio を介してデータベースにアップロードする必要があります。
- Google Cloud コンソールで AlloyDB Studio を開きます。
- 左側のパネルの下部に、[コンテキスト セット] と 3 つのドットが表示されます。
- クリックして [コンテキスト セットを作成] を選択します。
- ダイアログに情報を入力します。
- 名前:
conference_context - 説明:
Conference Sessions QueryData Context - コンテキスト ファイルをアップロード: 上記の内容で作成した JSON ファイルをアップロードします。
- 名前:
- 保存します。
QueryData コンテキストをテストする
アップロードしたら、AlloyDB Studio で直接テストできます。
- 作成したコンテキストの横にある 3 つのドットをクリックし、[コンテキスト セットをテスト] を選択します(または、クエリエディタで Gemini ピルを使用してこのコンテキストを選択します)。
- Gemini SQL 生成プロンプトで、テンプレートに一致する自然言語クエリを入力します。
Advanced sessions that are almost full - SQL を生成し、提供したテンプレートと一致していることを確認します。
- 自然言語プロンプトで「Advanced」を「Beginner」に変更して、パラメータ化されたクエリを試して、適応するかどうかを確認します。
11. クリーンアップ
AlloyDB クラスタを削除する
Google Cloud アカウントに継続的に課金されないようにするには、この Codelab で作成したリソースを削除します。
Cloud Shell で次のコマンドを実行して、AlloyDB クラスタを削除します(インスタンスも削除されます)。
export REGION=us-central1
export ADBCLUSTER=alloydb-next26-ai-demo-01
echo "=> Deleting AlloyDB Cluster (${ADBCLUSTER})..."
gcloud alloydb clusters delete $ADBCLUSTER --region=$REGION --force
または、この Codelab 専用のプロジェクトを作成した場合は、プロジェクト全体を削除することもできます。
IP 範囲と vpc-peering を削除する
PROJECT_ID=$(gcloud config get-value project)
echo "=> Deleting Service Networking VPC Peering..."
gcloud compute networks peerings delete servicenetworking-googleapis-com \
--network=default \
--project=${PROJECT_ID} --quiet || true
echo "=> Deleting Allocated IP Range for Managed Services..."
gcloud compute addresses delete psa-range \
--global \
--project=${PROJECT_ID} --quiet || true
ローカル ファイルを削除する
Work with QueryData in AlloyDB Studio の手順で作成したローカル JSON ファイルを削除します。
12. 完了
おめでとうございます!統合された会議セッション シナリオを使用して、複数の AlloyDB AI 機能を正常に確認できました。
学習した内容
- セマンティック フィルタリングとスコアリングにAI 関数 (
ai.if、ai.rank)を有効にして使用する方法。 - Reciprocal Rank Fusion(RRF)を使用して、ScaNN(ベクトル)インデックスと RUM(テキスト)インデックスを使用してハイブリッド検索 を実装する方法。
- AlloyDB Studio でQueryData を使用して、自然言語から予測可能な SQL を生成する方法。
次のステップ
- AlloyDB AI のドキュメントを確認する。
- pgvector と ScaNN の詳細を確認する。