build-model skill uses and which reads well in an explanation. Requests always use the typed fields, never the bracket string.
The written notation
In a layout, an item filter is always a list of items to keep. Ranges, exclusions, and
where conditions have no layout field. To narrow an existing axis by a condition, such as Region not in {"West"}, set the axis’s members condition with row_updates or column_updates, as Filter the items an axis shows describes.
Table layout fields
edit_table_blocks create and reshape take rows and columns as lists of nodes. structure.insert on update takes one node per entry, with the side it joins, rows or columns, and an optional parent, before, or after. inspect_table_blocks returns the same saved shape under layout.rows and layout.columns.
A
space node, a branches node, and a node kept as saved by target alone take none of children, role, grain, sort, summary, or members.
A breakdown in the written notation and in the typed fields:
- A mapping relates them. Each key item pairs with the item the mapping gives it, whether the key item was added by hand or comes from a source table. The rows are the items the mapping resolves, the catch-all included. A hand-added key item the mapping does not resolve pairs with every mapped item the rows have.
- One source table’s rows carry both. The items pair as they do in those rows.
- Neither relates them. Every item of one level pairs with every item of the other.
Canvas dataset layouts
A Canvas dataset declares the same visible shape in a flatter form, under itslayout.rows and layout.columns:
An entry with
branches and no variable forms a shared grouping axis. Canvas blocks for agents covers the rest of a dataset.
Variables and Dimensions as rows
Each row in a table’s view is either:- a Variable, which measures something, such as Revenue, Headcount, or Gross Margin; or
- a Dimension used as a mapping, where each cell shows that Dimension’s item for its row and column instead of a number. This suits a database-style list of entities and their attributes.
breakdown on a Dimension node is refused before anything saves with breakdown belongs to a variable; nest a dimension’s levels with children. On a Canvas dataset the refusal explains the record-key and mapped-field roles instead: consecutive Dimensions on the record axis are the key rows, and a Dimension on the value axis is a field showing the item each record is mapped to.
Orientation
By default, a view with a measured Variable keeps values on rows, and its Dimensions, including time, on columns. A flipped view puts the Variables on columns instead. A mapping-only view has no Variable to mark a side. The side that carries afilter, a when, or branches is the key side, because only the record breakdown holds those; with none on either side, the longer side shows the mapped fields and the other side the keys. Such an entry on both sides is refused, because the side chosen for the fields cannot hold one. To read keys down the rows, put a filter, when, or branches on the key rows, or keep the columns list at least as long as the rows list. A node kept from the saved table keeps the saved orientation.
There is no separate transpose action. To flip a table, reshape it by moving the Variables between rows and columns. Moving an axis changes the presentation, not the grain of any cell.
When a table comes back empty
An empty result on a table with dates often means the table’s window, the date range and grain it is set to show, does not cover the dates that hold values. Writing dated values does not move the window: avalues write that names a period outside it is refused, and the same request can widen window and write the new periods, as Write values into dated columns describes. A wrong window is fixed on the table itself, with window. Two other causes are common:
- An item whose cells are all empty is hidden when the table hides empty items.
show_empty_memberssets this:falseasks to hide items whose values are all zero or empty, subject to the workspace policy; omitted,createuses the workspace default andupdatekeeps the saved setting. - An item outside a formula’s condition reads empty.