Studio
A raw SQL editor for running read-only queries directly against a connected warehouse.
In this section
Part of Celiq's semantic layer platform. Connect your warehouse, model your data once, query it everywhere.
Studio
What is Studio
Studio is a raw SQL editor. You pick a warehouse connection, browse its schema, write SQL, and run it directly against the warehouse. The toolbar is literally labeled "Raw SQL Editor" in the code.
It is read-only by policy: the backend (POST /api/studio/query) rejects anything that does not start with SELECT, WITH, or EXPLAIN, returning "Only SELECT, WITH, and EXPLAIN statements are allowed in Studio."
There is also a CML-aware endpoint (POST /api/studio/query/cml) that builds SQL from a domain's reveal + nodes rather than from hand-written SQL.
When to use it
- Ad-hoc exploration of a connected warehouse without building a domain/reveal first.
- Sanity-checking the underlying tables behind a metric.
- Quick
EXPLAIN/ read-only verification queries.
Access requires Tracer or above — every Studio route is guarded by tracerAndAbove.
How to use it
- Open Studio.
- Choose a Connection from the dropdown. The list comes from
GET /api/studio/connectionsand excludes internal connections (names starting with_celiq_). A green ● Live chip appears once a connection is selected. - Browse the Schema Browser on the left. Selecting a connection calls
GET /api/studio/connections/:name/schema; clicking a table appendsSELECT * FROM <schema>.<table> LIMIT 100to your SQL. - Write SQL in the editor.
- Click ▶ Run (or press ⌘↵ / Ctrl+Enter).
- Results render in a table below, with a row count and duration (ms) header.
Key concepts / fields
- Warehouse-aware execution — query execution routes through
warehouseDriver(getDriver/buildConnMeta), so raw SQL runs against the correct engine (BigQuery, Snowflake, Postgres, …), not a hardcoded Postgres driver. - Query history — every run is logged to the
query_historytable withsource = 'studio', the SQL, duration, row count, and status. - Result shape —
{ rows, columns, duration_ms, row_count, connection }. Columns may arrive as strings or{name,type}objects; the UI normalizes both. - Statement allow-list —
SELECT/WITH/EXPLAINonly; anything else is rejected before hitting the warehouse.
📸 Screenshot: Studio — connection dropdown, schema browser, SQL editor, results table
Related
- Connections
- Discover — the governed, no-SQL way to query metrics
- CML reference — the modeling language behind the
/query/cmlpath - Forge — where domains/nodes/reveals are modeled