Skip to main content
Connect a Google Cloud AlloyDB database to Raily and choose the tables you want agents to use. Raily reads your tables where they are. It does not copy your data, re-embed your vectors, or change your database.
AlloyDB is available on request. Contact us to turn it on for your Account.

Before you start

  • A database user Raily can log in with. Use a dedicated read-only user, not a database owner. It needs SELECT on the tables you want and USAGE on their schemas. Raily shows the commands to set this up during the connection (see step 3).
  • Public IP enabled on your AlloyDB instance. Instances with private IP only can’t be connected. Raily connects through Google’s authenticated connector, which verifies the server and encrypts the connection, so you don’t need to deploy a proxy or allowlist IP addresses. See Google’s guide to enabling public IP.
  • Two Google Cloud roles for Raily’s service account in the project that holds your instance: AlloyDB Client and Service Usage Consumer. These let Raily open a connection. They don’t give access to your tables.
  • For vector tables: each vector column must declare a fixed size (for example vector(768)), all vector columns in a table must have the same size, and the table needs an id column or a single-column primary key. You also need to know which embedding model and version created the vectors.

Steps

In the sidebar, open Search Rail and click Connect source. Then click the Google Cloud AlloyDB card. The form has three stages: Connect, Choose tables, and Review.
1

Name the Source

Enter a Name for this connection.
2

Enter the connection details

  • Instance resource name: the full resource name of your instance, in the form projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID/instances/INSTANCE_ID. Use the resource name, not the IP address. Open Find your instance URI under the field if you need help finding it.
  • Database name: the database that holds your tables (not the cluster name).
  • Database username: defaults to raily_reader. Change it if your read-only user has a different name.
  • Database password: the password of that database user, not your Google account password.
If you already have a connection string, click Paste a connection string instead. It must use the form postgresql://USER@alloydb/DATABASE?instance_uri=projects/.... Keep @alloydb as shown and leave the password out of the string. Enter it in Database password.
3

Grant access (first connection only)

If you haven’t set up access yet, open Set up access for a first connection. It shows commands filled in with your details, each with a copy button:
  1. Google Cloud connection permissions: the Raily service account for your Account and two gcloud commands that grant it AlloyDB Client and Service Usage Consumer. Run them as someone who can update the project’s IAM policy. Don’t grant Owner or Editor.
  2. Database read permissions: a GRANT pg_read_all_data command for your database user. This grants read access to every database in the cluster that the user can connect to. If you want to limit Raily to specific tables, skip it and use a user that already has SELECT on only those tables.
Two optional sections cover a database that restricts who can connect (Allow connection to a restricted database) and creating a new read-only user (Create a database user if you need one).Already have a user that can read your tables? Skip this step.
4

Test the connection

Click Test connection & load tables. When the test passes, click Continue to tables.
5

Choose tables

Raily lists every table and view the database user can read, grouped by schema. Select the ones you want.
  • Tables with vectors need an embedding model. Pick the same model and version that created the table’s vectors. Models with a different vector size are disabled, but a matching size alone is not enough: it has to be the same model.
  • Regular tables show Table analytics. No embedding model needed.
Don’t have one yet? Open the embedding config picker and click Create New.
Embedding config picker with Create New

Create a new embedding config

Enter a Name, pick a Provider, and set the Model Name and Dimension to match the model that created your vectors. Add an API Key if the provider needs one, then save.
Embedding config form fields

Embedding config form

If you selected any vector table, tick the box confirming that the model, version, and dimensions match each table’s existing embeddings. Then click Continue to review.
6

Review and connect

Check the instance, database, database user, and each table. Vector tables show Semantic search and analytics with the model you picked. Regular tables show Analytics only.Click Connect & generate configuration. Raily sets up search for each table automatically. Your database is not changed.
7

Create an endpoint

When the search configuration is ready, the Source page shows Finish setup: create endpoint. Click it, confirm a name and sign-in, and create the endpoint your agents will connect to.
When setup is done, the Source page shows which endpoints search it (Searched by). Ask a question in Test your endpoint to check the answers. New tables you add to AlloyDB later are not picked up automatically. To add one, edit the Source, click Test connection & load tables again, and select it.

Content tables and data tables

Raily looks at your database catalog and decides what each table can do. You don’t set this yourself. Tables with vectors hold content: articles, documents, products, support tickets. Agents use them to find rows by meaning, and they can also count and total those rows. Example questions:
  • “What have we published about electric car subsidies?”
  • “Find support tickets where customers complain about late delivery.”
  • “How many articles about Switzerland were published in 2025, and show me a few.”
Regular tables (no vector column) hold records you want to measure: orders, events, sign-ups. Agents use them for counts, sums, averages, minimums, maximums, and earliest or latest dates, optionally grouped by a column or by day, week, month, or year. Example questions:
  • “How many orders were placed in March 2026?”
  • “What was the total revenue per region last year?”
  • “What’s the average delivery time by month in 2025?”
A few things to know about table answers:
  • Raily computes calendar periods itself. When a question names a whole year, month, or day (“in March 2026”), Raily works out the start and end dates, so the count covers the full period. Periods and date groupings use UTC.
  • One table per answer. Raily doesn’t join tables. A question that needs data from two tables gets a separate answer from each, never a combined total.
  • One measure per question. Ask “how many orders” and “what was the total revenue” as two questions.
  • Grouped answers are capped. Raily returns up to 20 groups and says when more exist.
  • Counting distinct values and ranking are not supported. For example, “how many different customers ordered” or “top 5 products by sales”.
  • Regular tables can’t answer “find me” questions. They have no vectors to search by meaning. Ask them for a count or a total instead.

Next steps

Create an AI endpoint

Let agents search this source

Data Catalog

Review the fields agents filter on