AccelerUpDocs
Data warehouse/Explorer and SQL Lab

Explorer and SQL Lab

Browse the schema, write queries, and turn a good one into an alert.

Explorer

Data Warehouse → Explorer browses the schema: databases, tables, columns, types, row counts and sample values.

Sample values are the useful part. A column called status tells you nothing; a column called status whose values are pending, settled and chargeback tells you what to write.

SQL Lab

Data Warehouse → SQL Lab is the query editor.

EditorSyntax highlighting, schema-aware completion
RunAgainst any connection
ResultsTabular, sortable, exportable
HistoryYour recent queries
SavedNamed queries, shared within the organisation

From a query to something useful

A query in SQL Lab can become:

A SQL alertAlert on what it returns
A dashboard tileChart it
A scheduled queryRun it on a schedule and export or notify
A KPI report metricPut it in the daily digest

The Create alert button carries the query across — you do not retype it, and it cannot drift from the one you tested.

Writing for alerting

If the query is destined to be an alert, shape it for that from the start. See Writing the query, and in particular:

  • return a row with 0 rather than no rows when healthy
  • name columns after what they mean
  • include a freshness column to use as a guard

Limits

Two-minute timeout, row cap, read-only statements. Every execution is recorded in Query audit.

Tip

Use LIMIT while exploring. An unbounded SELECT * on a large ClickHouse table will find the timeout, and will make the warehouse do a lot of work to tell you nothing.

Where this behaviour lives: frontend/src/app/dwh/explore/, frontend/src/app/dwh/sql/. If the code and this page disagree, the code is right — please fix the page.

Part of Data warehouseQuerying the warehouse, and alerting on what the query returns.