Practice
Text-to-SQL is a demo, not a data platform
Ask-your-data tools demo beautifully and break on the real warehouse. The problem was never the SQL. It is the schema, the semantics, and the definition of revenue.
By The editors · · 2 min
The demo is genuinely good, which is the problem. Someone types "revenue by region last quarter," a model writes clean SQL, a chart appears, and a room of executives concludes the data team's backlog was a lifestyle choice. The verdict, before the enthusiasm sets: text-to-SQL solves the part of analytics that was never the bottleneck and leaves the part that was.
Writing SQL against a clean, well-named schema is the easy case, and it is the case every demo runs. Production is not that. Production is forty tables that could each mean "revenue," three of them deprecated, one correct only if you know to exclude the intercompany rows. The model does not know that. It cannot know that, because the knowledge is not in the schema. It is in the head of the analyst who got burned by the intercompany rows two quarters ago. Point a model at the real warehouse and it will answer the wrong question confidently, in valid SQL, which is worse than an error, because an error at least announces itself.
The tools that actually work do not point the model at raw tables at all. They point it at a semantic layer: a governed set of metrics where "revenue" has one definition, the joins are predefined, and the model's job shrinks from "understand the warehouse" to "pick the right named metric and filter it." That is a real and useful shape. It is also the shape that assumes the data team has already done the hard part, defining the metrics, which means the AI did not remove the labor. It moved the labor earlier and made it a prerequisite.
A responsible pilot measures the thing that actually fails. Not "can it write SQL," which it can, but "does it pick the right metric against our schema," which is an evaluation you have to build from your own questions and your own known-good answers. The teams that get value run that eval before they trust a number, treat every generated query as a draft a human approves, and scope the tool to the governed metrics rather than the raw tables. The teams that get burned skip straight to the board demo and find out in production which of the forty revenue tables the model liked.
So the honest read, stated as verdicts. Text-to-SQL over a modeled semantic layer: worth piloting, with metrics governance as the real project and the chatbot as the thin part on top. Text-to-SQL over the raw warehouse: a demo, and a way to produce wrong numbers faster than anyone can check them. The category is not quite marketing. It is a real feature wearing a claim about who it replaces, and the claim is backwards. The tool is only ever as good as the semantic layer beneath it, and building that layer was the job all along.