Skip to content
Shapemetry

Model - tables[]

Every method of the tables[] lane. Each step of a tables[] entry returns a table, and the lane's entries are addressed by the identity schema/lanes.ts declares for it.

MethodDescriptionArgTypeDefaultMeaning
columnColumn — Header node — declares one column (columns[], never operations[]). The node's own key IS the column key.typestring''Display type hint for the cell values.
formatstring''Display format hint (e.g. a number format).
valuefunction(row) => computed column — derives this cell from the rest of the row.
rowRow — Producer — one literal row. Arg keys are free-form: each one is a CELL, named after the column it fills, and its input is an ordinary expression.
tableAddRowAdd Row — Transform — append one computed row (a totals line, say) built from the rows already in the stream.computefunction(rows) => returning the new row object.
tableAnalyzeAnalyze — Chain head — a sweep / optimize / monteCarlo run PERSISTED as a live table. Always runs against a fresh detached copy of the model.modestring'sweep'Which analysis to run.
parametersobject[]Parameter ranges to explore.
measuresobject[]Measured outputs to record per run.
objectivestring''Measure name to optimize (optimize mode).
goalstring'min'Optimize toward the minimum or maximum.
maxEvaluationsnumber100Evaluation budget (optimize mode).
samplesnumber100Sample count (monteCarlo mode).
seednumber1Deterministic sampling seed — the same seed always produces the same rows.
tableFilterFilter Rows — Transform — keep only the rows the predicate accepts.keepfunction(row) => true(row) => truthy to keep the row.
tableGroupGroup Rows — Transform — collapse rows sharing the by keys into one row per group, aggregating the remaining columns.bystring[][]Column keys to group on.
aggregateobjectPer-column aggregation, e.g. { qty: 'sum' }.
tableJoinJoin — Transform — merge columns from another tables[] chain onto matching rows.sourcestring''tables[] chain key to join against (quote literals).
onobjectKey mapping, e.g. { sku: 'code' }.
typestring'inner'Join type.
tableSheetsSheet Index — Chain head — one row per sheets[] entry, read from the lane's HEADERS only (never a sheet body), so a drawing index may sit on a sheet it lists.fieldsstring[]['key', 'title']Header fields to emit per sheet.
tableSortSort Rows — Transform — order the row set by one column.bystring''Column key to sort on.
descendingbinary01 = high to low.
tableSourceScene Source — Chain head — one row per scene entity. entities empty scans the WHOLE scene (a lazy sceneFrame pull); non-empty narrows to an explicit reference.entitiesentity[][]Explicit entity reference to report on. Empty = scan the whole scene.
typestring[][]Scene-entity types to keep (empty = all).
fieldsstring[][]Columns to emit per entity (empty = the default field set).
tableUnionUnion — Transform — append another tables[] chain's rows to this one.sourcestring''tables[] chain key whose rows are appended (quote literals).
Last updated: 📖 3 min readEdit on GitHub