When Does Solid Execute SQL?

A single reference for every mode in which SQL runs somewhere in the Solid pipeline — who runs it, what comes back, and what crosses the network boundary.

Solid touches SQL execution in several different ways depending on what you're doing — ingesting a new source, building a model, running benchmarks, asking a question in Analyze, or calling the MCP server. Each mode has a different execution identity, a different executor, and a different answer to "does data leave your warehouse." This page is the single source of truth for all of them.

The Matrix

ModeIdentity UsedSQL ExecutorData ReturnedCrosses Network Boundary?Data Persisted?Timeout / LIMITPermission Model
Ingestion (schema, query logs, samples)The connector service account/role created during setup (e.g., SOLID_DATA_ROLE on Snowflake, a service principal on BigQuery/Databricks/Synapse)Solid's ingestion pipeline, querying system/information-schema views and sampling column values directly against your warehouseSchema metadata, query log entries, table stats, and column-value samples (not row-level data)Yes — metadata and samples move from your warehouse to Solid's ingestion serviceMetadata and samples are persisted in Solid's store; no row-level data is ever persistedSampling queries use a row LIMIT (typically up to 100,000 rows per table); no correction loop involvedRead-only, schema-scoped grants defined per connector (see each Connecting Your Data guide)
Model Creation (Auto-Create)N/A — no new query execution against your warehouseNone. Auto-Create reasons over metadata and certified SQL examples already collected during ingestion; it does not execute new queriesA draft semantic modelNo — this step works entirely from already-ingested dataThe draft model definitionN/AN/A
Benchmarking (Auto-Evaluate)Solid's connector service account — the same read-only, schema-scoped credentials used for ingestionSolid's own data_server — executes both the generated SQL and the certified ground-truth SQL and compares the resultsResult rows from both SQL executions, used transiently inside data_server to compute the accuracy score — never shown to users or the LLM, and not persistedYes — SQL text goes to the warehouse; result rows come back to data_server for scoring. This is the one mode where result rows cross back through Solid's system, and it is handled as internal validation data, not user-facing outputBenchmark accuracy scores and pass/fail per question are persisted; raw result rows are notA fetch-limit is applied to execution; no LIMIT is injected into the SQL string itselfRead-only, scoped to the tables/schemas exposed to the semantic model
Interactive AnalyzeThe end-user's own mapped warehouse credentials (or a scoped service identity configured at the integration level, e.g., OAuth sub→warehouse login mapping)Customer's data warehouse — Solid generates SQL; execution happens in the warehouse, not inside SolidA formatted answer derived from the results; raw result rows are not displayed in Solid's UI or exposed to the LLMGenerated SQL goes to the warehouse; Solid's backend receives the query outcome to format an answer — raw rows are not surfaced in the UIQuery history and usage metrics; raw results are not persistedWarehouse-enforcedThe end-user's own warehouse credentials — Solid does not elevate or share permissions across users
Runtime MCP (SQL Generation tool)The end-user's own warehouse credentials, via the calling agentThe agent that called the MCP server — never SolidThe generated SQL, plus a reasoning explanationNo — Solid returns SQL only; execution and data retrieval happen entirely between the agent and your warehouseNothing beyond usage/audit logs of the MCP call itselfWhatever timeout your warehouse and agent enforce — not controlled by Solid at this stageWhatever access the end-user's own credentials already have; Solid does not elevate or replicate permissions
External Agents (Bedrock, Copilot, custom MCP clients, etc.)Same as Runtime MCP — the end-user's or service's own warehouse credentials, via the calling agentThe calling agentSame as Runtime MCPNo — same boundary as Runtime MCPSame as Runtime MCPSame as Runtime MCPSame as Runtime MCP

Two Distinct Boundaries

It's easiest to keep straight if you think of two separate boundaries:

  1. The DB Agent boundary (Ingestion, Benchmarking, and the correction loop inside SQL Generation): Solid's own DB Agent executes queries for validation purposes — checking that generated SQL runs, checking that it matches ground truth, sampling for profiling. This executor is Solid's, using Solid-provisioned read-only credentials. See Controls and Safeguards and SQL Generation and Grounding for how the correction loop uses this boundary.
  2. The agent execution boundary (Runtime MCP and External Agents): the calling agent — not Solid — executes the final SQL that produces the answer a human or downstream system actually uses, with the end-user's own credentials. See MCP Runtime Flow for the full 8-step sequence.

The confusion in past conversations has usually come from describing one boundary while a listener assumed the other. Both are true simultaneously — they just apply to different parts of the pipeline.

Benchmarking and the "zero-raw-data" boundary

Benchmarking is the one mode where result rows cross back into Solid's system — and understanding why clarifies rather than undermines the broader architecture.

Benchmarking requires comparing two SQL results to produce an accuracy score: the generated SQL and the certified ground-truth SQL must be run and their outputs compared. That comparison happens transiently in Solid's data_server. The rows are never persisted, never shown to users, and never sent to the LLM — they exist only long enough to compute a pass/fail signal for each benchmark question.

This is separate from what happens at runtime (MCP or Analyze), where Solid generates SQL and your agent or warehouse executes it with your own credentials — and result rows never enter Solid's system at all.

If your security posture requires keeping all result data within your own network perimeter even for benchmarking, see Data System Collector — the collector model runs inside your network and handles validation locally.


Did this page help you?