Published on March 12, 2026

Calling Large Language Models via SQL for Data Engineering and Analytics

SQL as a Language for 'Talking' with AI: What the Hologres and Model Studio Integration Offers

Alibaba Cloud has integrated its Hologres database with the Model Studio platform, allowing data engineers to call language models directly from their SQL queries.

Products 4 – 5 minutes min read
Event Source: Alibaba Cloud 4 – 5 minutes min read

Integration of Analytical Databases and AI Model Platforms

What Happened

The company has combined the capabilities of two of its products: the Hologres analytical database and the Model Studio AI model platform. As a result, data developers can now call large language models (LLMs) directly from SQL – without Python, separate infrastructure, or the need to understand how the models themselves are structured.

Simply put: you write an SQL query, call a model within it, pass it text or an image, and receive a response as data that you can then work with.

Benefits of SQL Based AI Workflows for Data Engineers

Who Needs This and Why

SQL is a language that virtually everyone who works with data knows. It has been around for decades, is easy to understand, predictable, and integrated into familiar workflows. A vast number of analytics systems and pipelines are built on it.

When AI capabilities become accessible through this same language, there's no need to change the tech stack, learn new skills, or wait for help from another team. A data engineer can immediately incorporate a language model into an existing data processing workflow, just like any other function in a query.

This is especially relevant for teams that don't have dedicated ML specialists or GPU infrastructure. The entire computational load remains on the Model Studio side – the user doesn't have to worry about it.

Use Cases for Document Analysis and RAG with SQL

Practical Applications

This integration enables several use cases that previously required separate tools and expertise.

PDF document analysis. You can pass the content of a document to a language model in an SQL query and ask it to extract the necessary information: summarize it, find specific data, or classify it. This is useful, for example, when working with contracts, reports, or technical specifications stored in a database.

Image understanding. Models capable of processing not only text but also images are also accessible via SQL. This means you can, for example, automatically describe images in a table or extract structured data from them – all within a single query.

RAG – Searching with proprietary data. One of the most popular approaches in enterprise AI is so-called RAG (retrieval-augmented generation), where the model answers questions by drawing not only on its training data but also on the company's specific documents or knowledge bases. Such a scenario can now be implemented using SQL, without building a separate architecture.

Architectural Challenges of Database and AI Integration

Why It's Not as Simple as It Looks

At first glance, this might seem like mere «syntactic sugar»: a model call wrapped in a familiar query. But a more significant integration challenge lies behind it.

Hologres must be able to correctly pass data to Model Studio, receive responses, handle errors, and integrate all of this into the database's transactional logic. In essence, the boundary between the analytics system and the AI platform becomes transparent, which requires tight integration at the architectural level, not just a simple «wrapper» over an API.

For the end user, this is all invisible. But it is precisely this invisibility that creates value: the developer doesn't need to think about what's happening «under the hood».

Infrastructure Requirements and Prompt Engineering Constraints

Limitations to Keep in Mind

The solution is tailored to the Alibaba Cloud ecosystem. If a team is already using Hologres and Model Studio, the integration feels seamless. If not, making the switch would require a deliberate decision to change or expand their infrastructure.

Furthermore, the quality of the results still depends on how well the prompts to the model are formulated. SQL simplifies access, but it doesn't eliminate the need to understand exactly what you are asking the model and in what format you expect the answer. Simply put, «asking in SQL» is not the same as «asking correctly».

Future of Embedded AI in Data Management Tools

What This Says About the Broader Trend

This move is part of a broader trend: AI capabilities are being increasingly integrated into the tools people already use for their work, rather than existing separately and requiring specialized knowledge to access.

Databases, code editors, spreadsheets, and task management systems are all gradually becoming entry points for AI. This isn't because it looks «nicer» in a presentation, but because that's where people actually spend their work time.

The ability to call a language model from SQL is a small but telling example of how the barrier to entry is being lowered. Not for everyone at once, and not for all tasks. But for a specific audience – data engineers and analysts – it represents a tangible shift in what is accessible without additional effort.

Original Title: Using SQL to Call LLMs? Hologres + Model Studio Enables Data Developers to «Talk» Directly to AI
Publication Date: Mar 12, 2026
Alibaba Cloud www.alibabacloud.com A Chinese cloud and AI division of Alibaba, providing infrastructure and AI services for businesses.
Previous Article SGLang Supports New NVIDIA Model from Day One: Implications for AI Agents Next Article MolmoBot: The Robot That Never Existed in the Real World – Yet Already Knows How to Work in It

Related Publications

You May Also Like

Explore Other Events

Events are only part of the bigger picture. These materials help you see more broadly: the context, the consequences, and the ideas behind the news.

Anthropic has proposed a way to standardize the integration of language models with external sources – from databases to work tools. We explore how the MCP protocol solves the problem of fragmented integrations.

Copy AIwww.copy.ai Feb 7, 2026

From Source to Analysis

How This Text Was Created

This material is not a direct retelling of the original publication. First, the news item itself was selected as an event important for understanding AI development. Then a processing framework was set: what needs clarification, what context to add, and where to place emphasis. This allowed us to turn a single announcement or update into a coherent and meaningful analysis.

Neural Networks Involved in the Process

We openly show which models were used at different stages of processing. Each performed its own role — analyzing the source, rewriting, fact-checking, and visual interpretation. This approach maintains transparency and clearly demonstrates how technologies participated in creating the material.

1.
Claude Sonnet 4.6 Anthropic Analyzing the Original Publication and Writing the Text The neural network studies the original material and generates a coherent text

1. Analyzing the Original Publication and Writing the Text

The neural network studies the original material and generates a coherent text

Claude Sonnet 4.6 Anthropic
2.
Gemini 2.5 Pro Google DeepMind step.translate-en.title

2. step.translate-en.title

Gemini 2.5 Pro Google DeepMind
3.
Gemini 2.5 Flash Google DeepMind Text Review and Editing Correction of errors, inaccuracies, and ambiguous phrasing

3. Text Review and Editing

Correction of errors, inaccuracies, and ambiguous phrasing

Gemini 2.5 Flash Google DeepMind
4.
DeepSeek-V3.2 DeepSeek Preparing the Illustration Description Generating a textual prompt for the visual model

4. Preparing the Illustration Description

Generating a textual prompt for the visual model

DeepSeek-V3.2 DeepSeek
5.
FLUX.2 Pro Black Forest Labs Creating the Illustration Generating an image based on the prepared prompt

5. Creating the Illustration

Generating an image based on the prepared prompt

FLUX.2 Pro Black Forest Labs

Want to dive deeper into the world
of neuro-creativity?

Be the first to learn about new books, articles, and AI experiments
on our Telegram channel!

Subscribe