SQL analytics
You can write and run SQL interactively against the platform, inspect the plan, save a query to a library, and submit long statements through an API. The point that separates this from a hosted SQL console is that there is no second path: an interactive query, a saved query, and an API statement all run as the caller through the same governed query plan as every other read, so the policy a query obeys is the policy the platform enforces everywhere.
Where you run SQL
| Surface | What it is |
|---|---|
| Query workbench | The multi-engine workbench in the Data Platform console, at /data-platform/query. Pick an engine, run a statement, read the plan, and save the query to a library you can reopen later |
| Workspace SQL editor | A SQL tab inside a workspace: run, EXPLAIN, and keep a local run history. The one in-console code-editing surface for a workspace |
| Statement Execution API | An asynchronous API for submitting a statement and fetching its result in chunks, for clients and tools rather than people |
The workbench is the richer of the two interactive surfaces: it runs against the platform engines (relational, analytical, graph, time-series, vector, key-value and document), renders an EXPLAIN result as a plan tree, and keeps a server-backed saved-query library scoped to you and your subject, so a saved query is available wherever you sign in rather than only in one browser. The workspace SQL editor keeps its history and saved text in the browser.
Every statement is governed as the caller
A statement does not run in a privileged side channel. It runs as the caller through the platform's in-engine enforcement, which means:
- Access control first. The statement is classified by what it does, and the caller must hold the matching permission for each verb it uses. A read needs read; an insert, update, delete, or schema change needs that specific grant on top. A statement the engine cannot classify is refused rather than waved through.
- Row filters compiled into the query. Row-level security predicates are pushed into the statement itself, so a caller sees only the rows they are entitled to, not a filtered copy applied afterward.
- Column masks on the result. Column-level masks are applied to the output under the same policy.
- Classification carried through. The read is classified, metered, and recorded for lineage the same way any other governed read is.
Because the filters and masks are part of the plan, there is no SQL-shaped hole where a hand-written query reads around the policy. The same statement issued over the PostgreSQL wire, from a BI tool, or by an agent obeys the same plan.
SQL execution is governed by in-engine enforcement: access control, row filters, column masks, and classification. It is not passed through the executive-function value gate that governs autonomous agent actions. The value gate decides whether an action is worth taking; the enforcement plane decides what a caller is allowed to read. A query is the second kind of question.
Reading the plan and the cost
The workbench and the workspace editor both support EXPLAIN: the engine returns its plan, rendered as a plan tree you can read rather than a flat string. A statement can also return a scan-cost estimate that reflects data-skipping, so you can see the shape of the work before you commit to it.
The Statement Execution API
For clients, tools, and automation, an asynchronous Statement Execution API submits a statement, polls its state, fetches the result in chunks, and cancels or deletes it. The surface is built to parity with the Databricks SQL Statement Execution API and the Snowflake SQL API, so a tool written against those shapes has a familiar target here, with the governed execution model above applied to every statement.
Two parts of that surface are on the roadmap and worth stating plainly: execution is eager today (a submitted statement runs immediately rather than queuing through a background pending and running lifecycle), and result delivery is inline rather than through signed external-link downloads. The submit, poll, chunked-fetch, and cancel operations are the shipped path.
SQL in a clean room
A query can be scoped to a clean room. Inside one, the same in-engine enforcement applies, and a clean-room collaborator reads through a bucketed disclosure rather than raw rows.
Be precise about where the stronger controls sit. The full clean-room egress controls, minimum-aggregation and k-anonymity thresholds, a per-collaborator differential-privacy budget against a room ceiling, output-volume caps, and content inspection, are enforced on the governed run and notebook path (see Notebooks), where an output crosses a sink. An ad-hoc interactive query in a clean room is governed by in-engine enforcement and bucketed disclosure; it is not the place the differential-privacy budget is drawn down.
The editor and the results grid
The workbench's query editor is built on a CodeMirror editor, not a plain text area. It ships three real language modes, a SQL dialect with schema-aware table and column completion, Python, and YAML, and the results grid is sortable, filterable and paginated rather than a static dump.
Three editor limits are worth stating plainly:
- Syntax parsing covers SQL, Python and YAML. GQL, Gremlin, Cypher, JSONPath, full-text search and plaintext get editor chrome, line handling, selection and the rest, but without syntax coloring, because a real parser for each is what earns coloring and those are not all built.
- The editor's Python support is for editing and highlighting, not execution. You write and read Python with full editor support here; running Python is the notebook kernel's job, not the SQL editor's.
- There is no natural-language-to-SQL and no in-editor AI query assist. AI is available as governed AI functions you call from SQL, which is a different thing from a model writing the query for you.
Results render in their native shape
A non-SQL result is not forced into a table. The workbench renders each engine's result in the shape that reads naturally, and keeps a table view as a first-class fallback on every engine:
| Result | Lens |
|---|---|
| Graph | A node and edge graph lens |
| Document | A tree lens |
| Time series | A line lens, when both a time axis and a numeric column are present |
| Vector | The rows, with an optional 2-D projection (PCA) |
The vector projection is best-effort: when it cannot be computed it is simply absent, and the result still renders without it.
The document lens
The document lens speaks a MongoDB-style surface. It supports find (filter,
projection, sort, limit, skip), count, and an aggregate pipeline. The
pipeline stages are $match, $group, $sort, $limit and $skip, and
$group carries the accumulators $sum, $count, $avg, $min and $max.
Filter operators include $gt, $gte, $lt, $lte, $ne, $in and
$regex.
Three behaviors are precise, and worth stating so there is no surprise:
- Unsupported aggregate stages are logged and skipped, not executed. A stage
outside the five above,
$project,$unwind,$lookupor$facetfor example, does not run and does not silently change the result; the supported set is those five stages. $nefollows SQL semantics, so a missing field does not match$ne, which differs from MongoDB's three-valued logic.findapplies a single global sort key.
Full-text search is a separate, first-class search lens, with its own search, facet aggregation and index operations, distinct from the document lens. Text search is not a special case of a document query here.
One registry resolves the dialect
A single canonical language-binding registry resolves a facade from an engine id or a query dialect, across eight facades: SQL, OLAP, graph, vector, document, search, time series and key-value. The registry is deny-closed: a dialect it cannot resolve is refused, so a non-SQL dialect is never silently run as raw SQL. That is what keeps a graph query a graph query and a document query a document query rather than collapsing everything onto the relational path.
How it compares
The parts that are hard to copy are the same ones that were always the point: every statement runs as the caller through one governed plan with row and column policy compiled in, the workbench spans more engines than a SQL-only console and renders each engine's result in its native shape, the registry deny-closes a dialect onto its real engine rather than onto raw SQL, the Statement Execution API targets Databricks and Snowflake parity, and a clean-room query inherits the room's disclosure controls.
Related topics
- Notebooks, where a SQL cell and a polyglot cascade run under the same governed engine, and where the full clean-room egress controls apply.
- In-engine enforcement, the row and column policy every statement runs through.
- Engines and access methods, the engines a statement can target and the protocols they already speak.
- Reporting and BI tool support, how an external tool connects and reads through the same governed plan.
- AI functions, the governed functions you can call from SQL.