Celiq
v0.12Open app
Docs/Developer/Studio

Studio

A raw SQL editor for running read-only queries directly against a connected warehouse.

Developer
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

  1. Open Studio.
  2. Choose a Connection from the dropdown. The list comes from GET /api/studio/connections and excludes internal connections (names starting with _celiq_). A green ● Live chip appears once a connection is selected.
  3. Browse the Schema Browser on the left. Selecting a connection calls GET /api/studio/connections/:name/schema; clicking a table appends SELECT * FROM <schema>.<table> LIMIT 100 to your SQL.
  4. Write SQL in the editor.
  5. Click ▶ Run (or press ⌘↵ / Ctrl+Enter).
  6. 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_history table with source = '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-listSELECT / WITH / EXPLAIN only; anything else is rejected before hitting the warehouse.
📸 Screenshot: Studio — connection dropdown, schema browser, SQL editor, results table
Status: built — raw SQL editor, schema browser, warehouse-aware read-only execution, and query-history logging are all implemented. the schema-browser warehouse coverage and whether the CML query path is surfaced in this screen.