Runs

A run compiles a checked model into SQL, DuckDB computes it, and the grid comes back whole.

One model, computed once

A run computes one model over one set of data and returns its whole grid. No cell is computed in application code. Calcbird compiles the checked model into SQL, and DuckDB runs it.

A model over a hundred thousand invoices and a model over ten rows of assumptions are the same operation.

The steps of a run

  1. Validate the project against its catalog. This reads no data.
  2. Translate each formula into a resolved form with no names left to look up.
  3. Order the drivers so each one is computed after what it reads.
  4. Write the SQL statements.
  5. Run them in DuckDB.
  6. Read the rows back into cells.

The cell budget

A grid is drivers times slices times steps, and slices multiply quickly. Six dimensions of five members that each roll up make 46,656 slices before a single step is counted.

A run that would produce more cells than the budget allows does not start. It reports the counts that made it too big, and it never returns part of a grid.

Comparing two runs

A comparison sets one run against another, such as the same project before and after a data sync. Both are ordinary runs, and the comparison pairs their cells.