Natural-language query over SAP data — text-to-SQL patterns and limits
As of 2026-11-08
What is Natural-language query over SAP data?
"Natural-language query" hides two structurally different techniques: semantic-layer-mediated NLQ (Just Ask, Joule Analytical Insights) answers only through a pre-modeled, governed vocabulary, while text-to-SQL lets an LLM write and run its own query against catalogued tables. Neither is universally better — the trade is flexibility against the guarantee that the answer reuses a definition someone already reviewed.
Two techniques wearing one label
"Ask your data a question in plain English" describes two structurally different mechanisms, and mixing them up in a proposal is how a delivery estimate goes wrong. The first, semantic-layer-mediated NLQ, is what SAC's Just Ask and, through it, Joule's Analytical Insights do: the question is matched against a pre-modelled analytic model — measures, hierarchies, labels already defined and reviewed — and the answer can only ever be as flexible as that model. The second, text-to-SQL, lets an LLM read table and column metadata from a governed catalog and generate its own query on the fly, closer to what Databricks Genie does against Unity Catalog: no pre-built model constrains the question, but nothing pre-built protects the answer either.
Why it matters
- "Natural-language query" is not one technique: semantic-layer-mediated NLQ and text-to-SQL fail in opposite ways — one fails visibly by silence, the other fails invisibly by plausibility — and scoping without naming which one leaves the real risk unaddressed.
- Access-control governance (catalog permissions) and semantic correctness (does the query mean what the business means) are different guarantees; text-to-SQL can deliver the first perfectly while still failing the second.
- Most business requirements for "ask your data anything" turn out, on inspection, to be requirements for trustworthy answers to a bounded set of questions — the semantic-layer-mediated case, not the open-ended one the phrase implies.
Key points
- Semantic-layer-mediated NLQ (Just Ask, Joule Analytical Insights): answers only through a pre-modelled, reviewed vocabulary; fails by silence or a traceable model gap.
- Text-to-SQL (Genie-style pattern): an LLM reads catalog metadata and writes its own query; fails by plausibility — a syntactically valid, confidently wrong answer.
- Governance (who can see what) rides on the catalog in both patterns and is well handled; semantic correctness (does the query mean what the business means) is structurally harder for text-to-SQL.
- The two are not mutually exclusive within one architecture — routine questions via semantic-layer NLQ, exploratory workloads via text-to-SQL over the same data products.
- A proposal naming only "natural-language query" without specifying the pattern has not scoped the skills, failure modes or governance story that differ between the two.
- Most real business requirements are for trustworthy answers to a bounded question set — the semantic-layer case — even when phrased as "ask anything."
Terms used on this page
- Semantic-layer-mediated NLQ
- Natural-language querying answered through a pre-modelled analytic model with governed measures, hierarchies and labels.
- Text-to-SQL
- An approach where an LLM generates and executes its own query against catalogued tables, without a pre-built semantic model.
- Catalog-level governance
- Access control enforced by the data catalog (e.g. Unity Catalog) regardless of which querying pattern is used above it.
- Confidently wrong answer
- A syntactically or fluently correct-looking answer that is semantically incorrect and gives no visible signal of the error.
- Trusted asset (Genie)
- A data-team-curated, verified question-to-SQL or metric mapping that a text-to-SQL system checks before falling back to free query generation.
- GraphRAG
- Retrieval that walks explicit graph relationships (SPARQL/RDF) rather than vector similarity or generated SQL — SAP HANA Cloud's Knowledge Graph Engine implements this for relationship-shaped questions neither NLQ pattern in this page answers well.
- Principal propagation (MCP)
- The mechanism carrying an MCP caller's real, signed-in identity through to an SAP ABAP user, so a text-to-SQL agent built over an MCP-exposed API inherits access control automatically.
- Validation layer
- A component built specifically to check a text-to-SQL system's generated queries against known-correct patterns before trusting the answer — the missing piece that catalog-level governance alone does not provide.
Sources
- SAP News Center — SAP Business AI: Release Highlights Q1 2026 (base for the Just Ask/Analytical Insights semantic-layer path)
- SAP Community — MCP Gateway in SAP Integration Suite
- SAP Community — principal propagation for MCP servers, SAP Integration Suite to S/4HANA
- SAP Community — querying RDF graphs with SAP HANA Cloud Knowledge Graph Engine (SPARQL as a structured alternative to text-to-SQL)
- Databricks documentation — Genie (AI/BI) overview (fetched 2026-09-27)
- Snowflake documentation — Cortex Analyst and the declared semantic model (fetched 2026-09-27)
- SAP News — Autonomous Enterprise: AI Agent Hub and AI Governance Assistant (Sep 2026)
- Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows — arXiv
- BIRD: A Big Bench for Large-Scale Database Grounded Text-to-SQL — arXiv
- A Semantic-Layer-Mediated Agent for Natural Language to SQL over Heterogeneous Enterprise Databases — arXiv
- LinkAlign: Scalable Schema Linking for Large-Scale Multi-Database Text-to-SQL — arXiv
- Analytical Insights in Joule — SAP Architecture Center
- Joule with SAP Datasphere: step-by-step setup guide — SAP Community
- Making NLQ More Explainable, Reliable and Actionable — SAP Community
- Genie documentation — Databricks
- Overview of semantic views (Cortex Analyst) — Snowflake documentation
- SAP TechEd 2026 (Berlin & virtual, 27–29 Oct 2026) — session AS263: Powering autonomous agents with natural language data access
Full card with the Consultant plan — €19.90/month. What the full card adds: the full decision framework · the SAP vs Snowflake / Databricks / Fabric comparison · the common pitfalls and their fix · the cheat sheet · the architecture schemas · the code blocks · the facts worth quoting.