Natural-language query over SAP data — text-to-SQL patterns and limits
As of 2026-09-25
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 (C353) — 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 (C349).
- 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.
Sources
Full card available to members. What the full card adds: the full decision framework · the common pitfalls and their fix · the cheat sheet · the facts worth quoting.