Skip to content

AlloyDB Omni Can Now Call Local Models Like Gemma 4 Directly From SQL

Google says its AlloyDB Omni PostgreSQL-compatible database now connects to locally hosted large language models such as Gemma 4 and Qwen3.8. The integration lets SQL queries call a model that runs inside the same environment as the data.

3 min readBased on 1 source25 views

TL;DR

  • AlloyDB Omni, Google's downloadable PostgreSQL-compatible database, now connects to locally hosted large language models (LLMs).
  • Models such as Gemma 4 and Qwen3.8 can be called from SQL, so prompts, data and responses stay inside your environment.
  • Google's walkthrough deploys the database and a model on Kubernetes, which suggests a setup teams can test on their own machines.

What changed

AlloyDB Omni is the run-anywhere edition of Google's AlloyDB database. It can be installed on your own infrastructure, in a datacenter or on a laptop, instead of only in Google Cloud. Google describes it as 100% PostgreSQL-compatible, so existing PostgreSQL applications and tools should be familiar territory.

The new part is the link to local models. Google says AlloyDB Omni can call a model server directly from SQL. In its examples the models are Gemma 4, an open model from Google DeepMind, and Qwen3.8. Google says the architecture stays the same whichever model you pick. Cloud-hosted models such as Gemini remain an option too, but the focus of this release is models you run yourself.

Built-in AI functions

The database itself includes AI features. Google says AlloyDB Omni uses the same ScaNN indexing technology that powers Google Search. Once a model is connected, you can store vector embeddings, which are numeric representations of text or other data, and search them by meaning rather than by exact keywords. You can also query the database in natural language.

In Google's example, a function such as ai.generate is called inside a normal SQL statement. The model's answer comes back as query output, so no separate application layer is needed for a simple call. Google also shows a transform step for reasoning models. Some models place chain-of-thought reasoning inside think tags in their output. The example removes those tags with a transform function, so only the final answer is returned.

Setup in Google's walkthrough

Google's guide runs on Google Kubernetes Engine (GKE), though the company says the same setup works on-premises or almost anywhere else. The steps are:

  • Deploy the AlloyDB Omni Kubernetes operator, a controller that manages the database on the cluster, using kubectl and Helm.
  • Create an AlloyDB Omni database with the googleMLExtension enabled.
  • Deploy the model with Ollama, a tool for running open models locally.
  • Register the model with the database using a SQL script, then test a query.

The guide notes two practical issues. A connection error may just mean the database is still provisioning, and a Resource not found error may mean the model has not finished loading. Both are worth expecting on a first run.

Why local models matter here

Google points to organizations that cannot send data to a public cloud service. It mentions air-gapped networks, which have no connection to the public internet, and strict data locality rules. For these environments, Google suggests use cases such as analyzing local logs, summarizing internal documents and running internal chatbots. The company says that because the database and model sit in the same place, data never crosses the public internet, and that local inference avoids network transit time.

The claims about privacy and latency come from Google's own announcement. The source does not include independent benchmarks, so the actual speed of a given setup will depend on hardware and model size.

Why it matters

For backend and data teams, the change moves a language model call into the database layer. A developer who already writes SQL can call a model without adding a separate inference service to the application code, at least for simple cases. Teams in regulated or disconnected environments gain a way to use agent-style features without sending records to an outside provider.

The trade-off is operations. You now run a database operator, a model server and the GPU or CPU capacity they need. Teams that want to try this should start with Google's Kubernetes walkthrough on a test cluster, and check how a model's output needs to be cleaned before it reaches users. For background on Google's wider open-source and cloud moves, see our earlier report on Google giving Agent Substrate, gVisor and OpenRL to the CNCF.

Sources

This article was written by Blozhik from the reporting below. Read the originals for full detail.

GoData + AI Anywhere: AlloyDB Omni integration with local modelsGoogle Cloud Blog
Was this useful?

Keep reading

Discussion · 0

Sign in to join the discussion. Liking does not need an account.Sign inRegister
Loading comments…
blozhikDeveloper news from across the web, explained. Every story links to its original sources.