Skip to content

Schema designer

Authoring a Mondrian cube by hand means writing schema XML — declaring fact tables, dimensions, hierarchies, levels, foreign-key joins, measures, aggregations. It’s a few hundred lines of XML even for a small cube, and most of it is mechanical. The Schema designer exists so you don’t have to.

Point it at a warehouse, describe the cube you want in one English sentence, and Claude produces a complete proposal. You review the measures and dimensions as editable cards, drag joins around on a visual graph, and either accept it as-is or refine it. The output is real Mondrian XML you can save, query, and version.

The five-minute version

  1. Pick a connection. Any saved warehouse connection shows up in the dropdown.

  2. Pick a fact table. We profile the schema (cheap — it’s metadata plus a few sample rows) and show you the tables. Likely-aggregate tables (agg_*, *_summary, *_rollup) are pushed to the bottom of the list so the canonical base-grain fact wins.

  3. Describe what you want. One sentence is enough: “Sales facts joined to customers and products, count of orders and sum of revenue, sliced by date.” This intent ships to Claude alongside the profile, and meaningfully improves the proposal vs. leaving it blank.

  4. Review the proposal. The cube card shows your measures and dimensions as editable chips. The join graph below shows foreign-key joins between fact and dimension tables as labelled edges.

  5. Render and save. Click Render XML to convert the proposal to Mondrian XML, then Save schema. The cube appears on the Schemas page and is queryable from Analyze immediately.

Editing the proposal

Claude’s first draft is usually close but rarely perfect. Everything on the cube card is editable in place:

  • Click a measure chip to rename it (RevenueNet Revenue), change its aggregation (sumcount distinct), or delete it entirely.
  • Click a dimension card to rename the dimension, edit its level hierarchy (e.g. add a Day of Week level), or change which column drives each level.
  • Click an edge on the join graph to change which columns the fact and dimension join on. Useful when the FK column name in your warehouse doesn’t match Claude’s first guess.
  • Click ”+ Add dimension” to pull in another table from the profile — opens a picker showing every dimension-shaped table and lets you wire the join in one dialog.

Re-rendering is cheap. Edit, click Render XML again, look at the new output. The warehouse profile is cached for the session so the cost is just one LLM call per iteration.

Date hierarchies

Date dimensions are the single most common cube element and the single most tedious thing to author by hand. The designer detects date-shaped columns (real DATE/TIMESTAMP columns, plus *_date / *_at / *_on named columns) automatically and adds a standard hierarchy: Year → Quarter → Month → Day. If your warehouse stores dates as strings in YYYYMMDD format the detector catches that too.

You don’t have to declare hierarchies manually — they come for free unless you want something non-standard (e.g. fiscal year starts in April), in which case you edit the dimension card.

Try before you save

The cube card has a small Try a query panel that runs an MDX sample against your draft before you commit it. It’s the fastest way to confirm the joins land where you expect and the measures aggregate the way you want. If a join is wrong, the sample shows inflated or null numbers immediately.

LLM cost and quota

Each Schema designer iteration costs us money — we pay Claude per proposal. To prevent runaway costs we apply a per-tenant monthly LLM budget across all tiers. You’ll know if you hit it: the page shows a clear warning and rejects further proposals until next billing cycle (or until you ask us to raise the cap).

Profiling and rendering are free; only the propose-and-refine step hits the budget.

  • Connections — the warehouse the designer reads from.
  • Schemas — where saved cubes live; the XML editor lives there too.
  • Cube library — pre-built templates if you’d rather start from a working cube than from scratch.
  • Analyze — open a saved cube in the Saiku UI to query it.