Vendor-authored · architecture only · no unpublished scores

NL2SQL tools: who writes the SQL, and who holds the DSN?

Text-to-SQL products differ on three contracts: whether the model emits SQL, whether the vendor runs the statement, and whether joins can be invented. PrismSQL is a compile-only hosted API. This page does not claim a Spider or BIRD ranking.

Decision summary. Choose a chat or Copilot SQL assistant when you want free-form SQL text and will review it yourself. Choose a RAG NL2SQL library or MCP database server when you accept a live DSN in the tool and want rows back. Choose PrismSQL when the schema must be allowlisted, the model must not write SQL, and the warehouse credential stays in your environment.

What was compared

There is no published vendor accuracy bake-off for PrismSQL. The table is an architecture split from the hosted implementation: JWT compile API, stored contract, closed Query IR, compiler-owned ranges and ORDER BY, static Shield. It is not a latency or exact-match study.

FactorChat / Copilot SQLRAG NL2SQL + DSNMCP database serverPrismSQL
Who writes SQLThe modelOften the model or a template over retrieved schemaThe model via toolsDeterministic compiler only. Closed Query IR has no SQL and no ON.
Warehouse credentialYours, if you paste a connection laterTypically in the library or vendor cloudIn the MCP hostNever sent to the hosted API
What comes backSQL textOften rowsTool results / rowssql_template + params, rows: []
JoinsUnconstrained unless you prompt otherwiseRetrieved schema; FKs may be inferredWhatever the connected DB allowsDeclared join_paths only. Cosine never becomes ON.
TenancyPrompt-dependentApp-dependentApp-dependentCompiler injects JWT isolation from the login, not from the prompt

Do not treat this table as “PrismSQL is more accurate.” Unknown tables refuse SEMANTIC_UNSUPPORTED. Nested AND/OR in the IR is refused. No SOC 2 claim.

Buyer fit

Choose execute-in-cloud or MCP when

  • You want the vendor or agent runtime to return rows.
  • You already trust that process with a warehouse DSN.
  • Unconstrained English-to-SQL is acceptable with human review.

Choose PrismSQL when

  • The schema must be an uploaded allowlist, not “any table the model names.”
  • You need parameterized SQL you bind in your own driver.
  • Isolation must come from the JWT, not from hoping the model adds a WHERE.

Companion vs the hosted compiler

PrismSQL itself is not a pip package. PrismSchema 0.1.0 (Apache-2.0, GitHub) generates the contract JSON from DDL or a local read-only database. It does not emit SQL. Upload that JSON in the dashboard, then call POST /api/prismsql/v1/query/execute.