The editor
New to Legend Cube? Take the tour, in the ☰ menu at the top left or on an empty cube's canvas: it walks through the editor one part at a time, on an example when the cube is empty.
The editor below shows the example Top customers by orders (Examples, then Northwind): it joins orders to customers, counts each customer's orders and keeps the ten customers with the most. The query is on top, as a graph of steps; its rows are below.
Click the image to see it full size.
The palette
- Sources: where the rows come from: a database table, a data product, an ingest data set, a function or a service. Click one to pick it, or drop it on the canvas.
- Steps: each works on the rows of the step before it. Click one to add it after the selected step, or drop it on the canvas; drop it on a step to add it after that step. A greyed-out step can't be added here; hover over it to see why, e.g. a database without JSON functions.
The header
- Cube: New starts an empty cube, Import opens a cube from its spec, Import Pure reads a Pure query into steps (checked as you type: its border turns green once Cube reads it and the engine compiles it), and Export shows this cube's spec, to copy or download.
- Add Items: the palette's sources and steps, as a menu.
- Examples: ready-made cubes on sample data, to try things out.
- Undo and Redo: every change, opening an example included (Ctrl+Z and Ctrl+Shift+Z, or Cmd on a Mac).
- Show Pure: the Pure query that runs, up to the output step.
- Hide graph: more room for the results; Show graph brings it back.
The graph
- A step: click it to edit it. Its editor opens beside it (see A step's editor, and each step's page under Steps).
- Output: marks the output step, the step Run Query runs up to. A step's menu and editor have Set as output to move it.
- Zoom in, zoom out and fit the graph to the view.
The results
- Server-side or Local: with Server-side, each sort and drill-down in the grid runs on the engine, over every row of the query; with Local, the grid groups, pivots and filters the rows already fetched, in the browser.
- How many rows came back, and how long the run took.
- Show SQL: the SQL the run sent to the database.
- Run history: the latest runs, fetches and exports, each with its SQL.
- Rows and Run Query: Run Query (F9) runs the query up to the output step and shows its rows; Rows caps how many come back. While the query runs, the button is Stop.
- A column's menu (⋮): sort, pin, autosize, choose the columns shown, or reset them. Right-click a cell for more: drill down by its column; sort, group or filter by it, as a new step; format a number column; copy; or export the rows. See The results.
A step's editor
Click a step on the graph to open its editor. This is the Group step's:
- The step's kind, and its id.
- ?: hover over it to see what the step does.
- Set as output: makes this the output step, so Run Query runs up to it and shows its rows.
- Close the editor.
- None: untick every group column (one row for all the rows).
- The columns to group by.
- Cancel the changes, or Apply them to the cube.
Where an editor lists columns, each shows its type as an icon: # a number, Tт text, a calendar a date or a date and time, a clock a time, a toggle true or false, a list an enumeration, a tree JSON. Point at the icon for the type in words, such as Whole number, optional, and the exact type. An optional column can be empty. A source's column table names each type in words.

