AI-ready data

Text-to-SQL Platforms With Built-In Governance for Agentic Workflows

Agents need governance built into the data layer, not bolted on afterward.

Contributing Editor · · 14 min read
Agentic Data Access · September 20, 2026 · 14 min read · 3,072 words

Text-to-SQL platforms are everywhere now, but most of them were designed for a person who already knows what they're looking at: a data analyst, typing a question, reading the result, and catching the error before it does any damage. That review step disappears the moment an agent is running the query on its own. This piece maps what actually means at the architecture level, once you take the human reviewer out of the loop, and which platforms build for that reality versus which ones assume it's still an earlier era and someone's watching the screen.

The original design assumptions behind text-to-SQL were narrow: a known schema, one fixed database connection, and a human who'd notice if the output looked wrong. Enterprise data doesn't work that way. A single business question might touch PostgreSQL for transactional records, Snowflake for the warehouse, a REST API for a third-party vendor feed, and, somewhere in the back office, a legacy Oracle instance nobody wants to touch. Ask a model to answer across all four and you get predictable failures: hallucinated column names, joins across schemas the model has never actually seen, no transaction safety, and zero awareness of whatever data contracts or governance rules the organization has on paper.

Here's the part that gets missed constantly: the real failure mode of text-to-SQL isn't bad SQL. It's correct SQL, syntactically clean and logically sound, run against data the person asking should never have been able to see. A dashboard with a wrong number gets squinted at by a human who has a gut sense something's off. An agent reading that same bad number doesn't squint. It files the refund, updates the CRM record, sends the email. The human wasn't just a user of the system, they were the quality control layer, and autonomy removes that layer entirely.

Research backs up both sides of this. Agentic approaches to SQL generation show something like a four-fold jump in accuracy over single-turn methods, according to Spider 2.0 benchmark work. That's real progress on correctness. But correctness and governance are separate problems entirely, and the EntSQL benchmark makes the gap brutally clear: the best evaluated system tops out at 15.9% accuracy once the task requires reading long-form enterprise documents, internal metric definitions, reporting conventions, the kind of institutional knowledge that lives in a wiki page nobody indexed. That 15.9% is the knowledge gap governance is supposed to close. Demo-ready and production-grade are not the same category of product, and the rest of this piece is about what actually separates them.

How much the data layer, not the model, is blocking enterprise AI from scaling

Nearly 90% of enterprises are using AI in some form. Most of them can't get past the pilot stage into anything resembling sustained business impact. That gap is the scale paradox, and it isn't a model problem.

A Cloudera and Harvard Business Review Analytic Services survey found that only 7% of organizations say their data is completely ready for AI adoption. A separate Dun & Bradstreet survey put an even sharper point on it: just 5% of respondents believe their data can support AI at enterprise scale. Those aren't model-quality numbers. They're data-layer numbers.

The 2026 Enterprise Data Readiness Report from thinklytics.com, drawing on 47 engagements audited between 2022 and 2025, found the model was almost never the actual blocker. What kept showing up instead: metric definitions that meant different things in different departments, no certified source of truth for the entities the model needed to reason about, and data pipelines that were built for reporting, never for feeding a live inference workload. Data quality problems and the lack of suitable data consistently appear as leading drivers of failed AI projects across both government and enterprise settings. Gartner has gone as far as projecting that, through 2026, organizations will abandon 60% of AI projects specifically because the underlying data quality isn't there.

Money is starting to follow the diagnosis. IBM reports that IT budget allocation to data strategy climbed from 4% in 2022 to 13% in 2025, and a Deloitte survey of Chief Data Officers found that data governance ranked as the top priority for 51% of them in 2025. That's not a side conversation anymore. It's where the budget is going.

Text-to-SQL makes this concrete in a way that's hard to argue with. On a clean academic benchmark like Spider 1.0, large language models routinely clear 85% accuracy. Drop the same models into an actual enterprise environment, per the BlazeSQL NL2SQL guide, and that number collapses to somewhere between 10% and 20%. The gap isn't the model getting worse. It's the model meeting real schemas, real naming conventions, and real ambiguity for the first time.

And the failure, when it happens, doesn't stay technical. It becomes a trust problem. Someone presents an AI-generated number in a board meeting. Someone else asks where it came from. If the honest answer is "not sure," the organization doesn't debug the pipeline, it goes back to manual reporting, full stop, regardless of how good the underlying technology actually was.

What "built-in governance" requires at the architectural level

"AI-ready data" used to mean something simple: clean, documented, governed data, handed off to a model, with a person sitting between the output and any real-world decision. Agents remove that person. So the definition has to change with them.

What an agent needs isn't just the data. It needs the context that made the data legible to a human in the first place, things like table descriptions, metric definitions, and the relationships between entities, delivered through a layer that both people and agents can actually query. That's three distinct things, and most vendor writing blends them into one:

Semantic model. What the data means: entities, relationships, descriptions, the synonyms a business actually uses for a concept. Metric definitions. How a number gets calculated. This is the "which version of revenue" problem, and it's more common than most people think. Governance. The enforcement layer sitting on top of the semantics, deciding which agent, user, or workload gets to touch which certified metric, and doing it at query time, not as a PDF policy nobody reads.

That last point is where architecture actually matters. If row-level and role-based rules get evaluated at query-compile time, an agent physically cannot generate a query that reaches data the user isn't cleared to see. The rule isn't a filter bolted on after the fact, it's baked into how the query gets built in the first place. That's a meaningfully different guarantee than "we checked permissions before showing the dashboard."

Take the case of multiple versions of revenue as a real example. Finance has a revenue number. Marketing attribution has its own, adjusted for channel. A growth team running an experiment might use a third. The data team has a canonical version meant to be the source of truth. All four are legitimate, correctly calculated numbers. Nothing in the metric definition itself tells an agent which one the business actually stands behind when someone asks a plain question. That decision is governance's job, not the model's, and definitely not something you want an LLM guessing at.

For this to work, the enforcement has to sit directly in the path of every AI query, at the exact moment semantic meaning gets resolved, before a single line of SQL gets generated. Not at the perimeter. Not as an audit that runs afterward.

Audit logging has its own bar to clear here too. Logging query text alone, at the volume an agent can generate, is close to useless. What matters is identity, intent, and lineage captured together, so when something goes wrong, the trail actually explains who asked what and why, not just what SQL ran.

Gartner has staked out a clear position on where this goes: semantic layers are increasingly treated as critical infrastructure, on the same tier as the data platform and the security stack. Gartner has predicted that 60% of agentic analytics projects relying solely on the Model Context Protocol, with no consistent semantic layer underneath, are headed for failure. Database coverage, a real semantic or context layer, permissions enforced at query time, audit lineage that actually means something, and SQL a human can inspect form the framework carried forward. Everything from here on gets measured against those five things.

What the current landscape of text-to-SQL platforms covers

The market splits cleanly into two products that get talked about as if they're the same thing. They're not.

One category is the developer assistant: tools that help someone who already knows SQL write it faster, inside an IDE they already live in. Governance here is the developer's problem to solve, not the tool's. The other category is the analytics platform: built so a non-technical person can ask a plain question against a warehouse and get a chart back, no SQL required. In that second category, governance can't be an afterthought, it has to be embedded in the product itself, because the end user has no way to catch a bad query on their own.

The question worth asking when buying isn't "can it write SQL." At this point, they mostly all can, to varying degrees of polish. The real question is whether it writes your SQL: your join logic, your metric definitions, your filters for excluding internal test accounts from a revenue number. That's a much narrower bar, and most platforms miss it in ways that only become visible once you're running real workloads.

Five things are worth checking on any platform, developer tool or analytics product alike:

  • Which databases it actually connects to, and how
  • Whether there's a governed context or semantic layer underneath the SQL generation, or just the model's best guess
  • Whether the generated SQL is visible and editable, or a black box
  • How it's meant to be used beyond the app itself: MCP server, API, that kind of surface
  • How AI usage gets billed, since metered-per-query pricing behaves very differently at agent volume than at human volume

Semantic layer tooling, separately, has settled into roughly four shapes. There are pure semantic layers that define metrics in code, YAML or SQL or a purpose-built DSL, meant to be consumed across BI tools, analytics products, and AI systems alike. There are warehouse-native semantic views, defined and enforced inside the warehouse itself. There are BI-native semantic models that live inside a specific BI tool and don't really travel outside it. And there are context layers that wrap around a semantic layer and expose governed metric meaning to AI agents, usually through MCP.

MCP, the Model Context Protocol, is quickly becoming the standard wire connecting agents to governed data. A growing number of platforms now expose an MCP server as a first-class feature, and that's turning into the real axis on which governance portability gets judged going into 2026: not whether a platform has governance, but whether that governance travels with the data when an agent, not a human, is the one asking.

Platforms built primarily for developer SQL productivity

These tools get judged on the same five criteria, but governance depth is intentionally light across the board, because the intended user is a developer who's expected to supply their own judgment and oversight.

DataGrip, JetBrains' AI Assistant, picked up meaningful upgrades through 2025: schema and object context attachment for sharper responses, execution plan analysis, cloud-based code completion, and cloud database integration across AWS, Azure, and Google Cloud. The free tier includes unlimited local model access through AI Chat (some features, like Junie and next-edit suggestions, need cloud models), and it supports OpenAI-compatible local endpoints like Ollama and LM Studio for teams that want to stay offline. Governance here rests entirely on the developer. No semantic layer, no query-time permission enforcement built into the platform. Paid tiers offering expanded features are available for teams that want more.

TablePlus takes a Bring Your Own Key approach, letting the user pick their own LLM provider rather than locking into one. It supports multiple databases through a native, modern interface, but it only handles text-to-SQL generation, not the broader AI feature set DataGrip offers. Governance, again, lives entirely on the user's side. There's no semantic layer and no platform-level audit logging.

dbForge AI Assistant targets SQL developers working across SQL Server, MySQL, MariaDB, Oracle, and PostgreSQL, aimed squarely at faster query generation and query optimization rather than governed self-serve analytics. It's sold as a per-user add-on to dbForge Studio (check Devart's site for current pricing). It's a strong fit for SQL Server or Azure SQL shops where the goal is developer speed, not opening up analytics to non-technical users.

Zencoder AI sits in this same developer-assistant category, though its supported databases aren't publicly listed in detail. Worth testing directly if it's under consideration, since the public documentation doesn't say much about compatibility or governance posture either way.

Across this whole tier, the pattern holds: the SQL generation itself is genuinely good for the audience it's built for. But governance, semantic layer, query-time permissions, audit lineage, isn't a platform feature here. It has to be built on top, separately, by whoever's deploying the tool.

Analytics platforms with context layers and inspectable SQL

Querio is built as an analytics platform first, not a SQL autocomplete tool bolted onto an editor. Its text-to-SQL engine runs on top of a governed context layer, a reactive notebook interface, and live warehouse connections, covering Snowflake, BigQuery, Amazon Redshift, ClickHouse, and MotherDuck on the warehouse side, plus PostgreSQL, MySQL, MariaDB, Microsoft SQL Server, and MongoDB for operational databases. Every connection is live, encrypted, and read-only, no extracts sitting around, no duplicated data drifting out of sync with the source.

The context layer is where data teams define table relationships, business metrics, and terminology once, up front, so every query downstream uses that standardized definition rather than whatever the model happens to infer on the fly. Ask for "conversion rate" and you get the data team's actual definition, not a guess. Those joins, metric definitions, trusted queries, and glossary terms live as plain SQL, Markdown, and Python files, synced to GitHub in the same repository as the customer's dbt project, which means the definitions are version-controlled the same way the rest of the data stack already is. Querio is SOC 2 Type II certified and goes through annual third-party penetration testing.

Pricing starts at $500 a month on the Startup tier ($5,000 billed annually) for up to 10 users, with MCP and API access included free up to 100 questions a month. AI usage is folded into the published price rather than metered per question: a per-query meter that works fine for a human analyst asking a dozen questions a day gets expensive fast when an agent is asking hundreds. The context layer clearly governs metric consistency; confirm directly against current documentation whether identity-scoped permissions and full audit lineage, identity plus intent plus lineage together, are native to the platform or need to be layered in externally.

Sequel AI offers conversational analytics with a semantic layer meant to standardize terminology, supporting PostgreSQL, MySQL, and Snowflake. Pricing runs on per-seat subscription tiers that scale with seat count and query volume, worth checking directly with the vendor since it's not fixed. It's a solid fit for teams that want conversational analytics with consistent terms across a smaller set of supported databases, though the database list is narrower than some competitors.

BlazeSQL doesn't publish detailed specifics on which databases it supports, so direct testing is the way to find out. What it does publish is a substantial guide on NL2SQL production reliability, which signals a positioning aimed at practitioners rather than casual users, even if the governance architecture underneath isn't laid out in much public detail.

SQLAI.ai splits into several distinct generators: Explain SQL Queries, Format SQL Query, Analyze Your Data for CSV uploads, Generate SQL Query, Fix SQL Queries, and Optimize SQL Query. It reads as a productivity tool for someone working solo on SQL tasks, not a governed analytics platform meant for a whole team. There's no semantic layer or query-time governance described anywhere in the product.

The pattern across this tier: context layers do real work improving metric consistency for the humans using them. But the harder agentic requirements, identity-scoped permissions enforced at query time, controls on write actions, full audit lineage, vary a lot from one platform to the next, and it's worth checking each one directly rather than assuming parity.

Platforms where governance architecture is the primary design choice

A smaller set of platforms treat governance not as a feature added after the SQL generation works, but as the actual reason the product exists. The distinction is visible in what gets built first: instead of starting with "can this model write correct SQL" and adding permissions later, these platforms start from "what can this agent be allowed to touch," and the SQL generation gets built inside that boundary.

A permission model built in from the start becomes part of how the query gets generated, rather than a filter applied after a bad query already exists. A permission check added after the fact is a filter, something that catches a bad query after it's already been generated. A permission model built in from the start becomes part of how the query gets constructed in the first place, closer to the compile-time enforcement described earlier, where the agent literally has no path to data outside its scope, because the rule was never separate from the query logic to begin with.

Does a permission change take effect on the next query, or does it need a re-index first? Is the audit log capturing identity and intent alongside the query text, or just the SQL string, which on its own tells you what ran but not who asked or why? And does the governance model travel with the platform's MCP or API surface, or does it only apply inside the platform's own interface, leaving a gap the moment an agent connects through a different door?

None of this is settled ground yet, and Gartner's own prediction that a missing consistent semantic layer will cause 60% of agentic analytics projects built solely on MCP to fail suggests the industry hasn't converged on a single right answer. What's clear is the direction: the platforms treating query-time enforcement and full-lineage audit logging as core architecture, not an add-on, are the ones built for a world where the agent, not a human, is the one asking the question.

Sources

  1. Best Text-to-SQL Query Tools in 2026, Compared - Querio
  2. Natural Language to SQL: The Complete 2026 Guide
  3. The evolution of agentic AI and text-to-SQL | Red Hat Developer
  4. EntSQL: A Benchmark for Grounding Text-to-SQL in Long-Context Enterprise Knowledge

More in Agentic Data Access