Google Cloud: AlloyDB Omni Can Call Local Models Like Gemma 4 and Qwen3.8 Directly from SQL
Google Cloud says PostgreSQL-compatible AlloyDB Omni can now integrate with locally hosted large language models, keeping prompts, data and responses in your own environment. The official walkthrough uses GKE and Ollama.
News date: About 5 min read
Contents
Google Cloud announced on its official blog that AlloyDB Omni, a PostgreSQL-compatible database, can now integrate with locally hosted large language models (LLMs, AI models that understand and generate text), using Gemma 4 and Qwen3.8 as examples. The model can be called from SQL, the standard language for querying databases. The article says readers can test it on their own machines "today", but it does not label a release stage such as preview, beta or general availability, nor does it describe plan or region limits. For teams with data residency requirements (rules that data must stay in a set location) or air-gapped networks (networks not connected to the outside internet), this suggests AI features may be usable inside the database without sending data out of their environment.
What actually changed?
According to Google Cloud, AlloyDB Omni is a 100% PostgreSQL-compatible database that runs anywhere, a downloadable edition of AlloyDB that can be deployed on your own infrastructure, including on-premises data centers. The company says the new integration with locally hosted LLMs lets AlloyDB Omni call a local model server directly from SQL, keeping prompts, data and responses within the user's environment.
Google Cloud also notes that AlloyDB Omni has built-in AI capabilities, including the same ScaNN indexing technology used in Google Search (used to quickly find similar data). Combined with a model, it can store vector embeddings at scale (turning text into a series of numbers so that similarity of meaning can be compared), run semantic search (searching by meaning rather than keyword matching), and even query the database in natural language. The company says almost any model can be used, whether a cloud model such as Gemini or a local model.
Which models are supported, and for which scenarios?
The local models named officially are Gemma 4 and Qwen3.8. Google DeepMind's Gemma 4 page calls them its "most intelligent open models", built from Gemini 3 research and technology; the 12B, 26B and 31B sizes target personal computers and consumer GPUs, while E2B and E4B target mobile and IoT devices.
Google Cloud says this approach suits air-gapped environments or those with data residency requirements, and can be used to analyze local logs, summarize proprietary internal documents and build localized chatbots. The benefits it lists: the database and model sit in the same local environment, so data does not cross the public internet; local inference reduces network transit time; and ordinary SQL queries can call machine learning functions that process data locally.
| Aspect | Gemma 4 example | Qwen3.8 example |
|---|---|---|
| AlloyDB model ID in the example | gemma4_llm | qwen3_8_llm |
| Corresponding Ollama model name | gemma4:12b | qwen3.8 |
| Deployment method | Deployed with Ollama (official example) | Also deployed with Ollama, with some lines changed |
| Model background | Google DeepMind open model, also available in E2B, E4B, 12B, 26B and 31B sizes | Qwen is a large language model series from Alibaba Cloud |
How to get started: the official example workflow
Google Cloud's demonstration uses Google Kubernetes Engine (GKE, Google's managed container platform) and says the same setup also works on-premises or almost anywhere. It assumes an existing GKE cluster with kubectl and Helm, two Kubernetes management tools, installed. Below is only a summary of the steps the company lists; see the original article for the full commands.
- Deploy the AlloyDB Omni Kubernetes operator with Helm (the operator automates deploying and maintaining the database; example version 1.9.0).
- Create a DBCluster with databaseVersion 18.4.0 and googleMLExtension enabled; the example resources are 2 CPUs, 4Gi memory and a 20Gi data disk.
- Deploy Gemma 4 or Qwen3.8 with Ollama; the example requests a 30Gi model disk.
- Connect to the database, create the google_ml_integration extension, define input and output transform functions, and register the model with google_ml.create_model.
- Create a customer_feedback table and use ai.generate with model_id to produce a one-sentence summary.
The company explains that the output transform function strips chain-of-thought content (the reasoning a model writes out before answering) from the response. The example also sets the request timeout to 600 seconds.
FAQ
Does using a local model mean data never leaves my environment?
Google Cloud says that when the database and model are in the same local environment, data does not travel over the public internet, and prompts, data and responses all stay within the environment.
Do I have to use GKE?
No. The company uses GKE only as a standardized, reproducible demo environment, and says the same setup works on-premises or almost anywhere.
Do I have to use Gemma 4 or Qwen3.8?
The company demonstrates with these two models, while saying almost any model can be used, including cloud models such as Gemini; the article does not describe compatibility details for other models.
What role does Ollama play in the workflow?
The official example deploys the models with Ollama; AlloyDB Omni calls the Ollama service in the cluster through the model request URL. Ollama's website says it can run open models locally or in the cloud, and that prompts are not stored or used for training.
Found this guide helpful? Share it with someone who needs it
Cloudflare WAF Blocks Ruby ruby2shell (CVE-2026-132825) by Default on All Plans, Including Free; Upgrading to 3.3.14, 3.4.13 or 4.0.10 Is Still Required
Cloudflare says it has added two default-Block WAF rules protecting against the critical Ruby vulnerability ruby2shell, covering Free through Enterprise plans; it stresses the WAF is only a compensating control and Ruby must still be upgraded.
PHP2Shell: Two Critical PHP Flaws (CVSS 9.2) Are Patched, but Dell Says You Should Also Rotate Credentials and Validate Backups
Google Cloud IAM Unified Access Policies Now in Preview: One Policy Can Bind Up to 25 Targets at No Extra Charge
NVIDIA and Microsoft at Ignite: Vera Rubin NVL72 in Preview on Azure, Nemotron 3.5 in Foundry, Windows 365 Direct Stream in Limited Preview
Sources
- AlloyDB Omni integration with local models | Google Cloud BlogChecked:
- Gemma 4 — Google DeepMindChecked:
- Qwen (Qwen)Checked:
- Ollama · Run AI models locally and in the cloudChecked:
Compiled from the references and verification dates listed above; fares, schedules, product features, and terms can change, so please confirm the latest details on the relevant official website before travelling, booking, or purchasing.