Repository navigation
Commit ba2ae64
committed
feat(cube-model): a @spine report as a Cube view (FR-044)
A served report with @spine is a Cube view, model/views/<Report>.yml, with no
rollup and no scope segment (a rollup on the spine cube is built from the
fact cube and loses the zero rows). Its first join_path is the spine cube
(the cube every listed dimension reaches after the spine's hops), including
the member each dimension reads under the dimension's name, with the
dimension's title, description and grains; its last is <Report>Facts with
the listed measures.
<Report>Facts is a standalone public: false cube (no `extends`, which would
copy the fact cube's rollups): `SELECT * FROM <@from table> <alias>` with the
report's @segment and @filter, ANDed, as its WHERE, so the scope stays inside
the join and a spine row whose facts are all filtered out keeps its row. It
holds @from's key and @from's own definitions of the listed measures, ratio
operands and <m>Raw members. The spine cube gets one one_to_many join onto it;
no reverse join is added to an ordinary cube, so ad-hoc answers are
unchanged. A multi-hop spine is built with standalone chain cubes
<Report>_<hop>, one per entity between @from and the spine entity.
Executed on Cube 1.7.43 before building: a view includes a private key and a
public: false member under an alias, include-level docs and meta reach
/v1/meta, the roster view returns every program (weeks 0, sums null, defaults
0), the scoped facts cube keeps the programs whose weeks are all short, a
two-hop chain equals the view lowering's SQL, and {Week.weeks, Program.id}
stays rooted at Week.
The guard is deleted: cube-pending.ts, ERR_CUBE_UNMAPPED_VOCABULARY and the
error-unmapped-vocabulary case. renderCubeViewYaml and the view types are
exported; the generator writes a view when every cube it reads is written and
cleans up model/views/*.yml. Corpus cases report-spine and
report-spine-multi-hop (hand-written goldens); the canonical golden gains the
two facts cubes and views. The cube lane compares ProgramRoster and
ProgramLongWeeks through their views (7 rows each), FitnessTotalsFilled
through its rollup, and reads a defaulted operand's COALESCE inside a ratio
from /v1/sql. Docs, spec section 5, roadmap and skills say both attributes are
mapped.1 parent adc8971 commit ba2ae64
58 files changed
Lines changed: 2320 additions & 408 deletions
File tree
- agent-context/skills
- metaobjects-authoring/references
- metaobjects-codegen/references
- docs
- features
- superpowers
- plans
- specs
- fixtures
- agent-context-conformance
- java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-authoring/references
- java-react/expected/.claude/skills/metaobjects-authoring/references
- python/expected/.claude/skills/metaobjects-authoring/references
- ts-react-tanstack/expected/.claude/skills
- metaobjects-authoring/references
- metaobjects-codegen/references
- ts-requirements/expected/.claude/skills
- metaobjects-authoring/references
- metaobjects-codegen/references
- cube-model
- canonical/expected/model
- cubes
- views
- error-unmapped-vocabulary
- report-spine-multi-hop
- expected/model
- cubes
- views
- report-spine
- expected/model
- cubes
- views
- generator-registry-conformance
- server/typescript/packages
- codegen-ts
- src
- cube
- generators
- reference
- test
- cube
- integration-tests/cube-live
- spec
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
483 | | - | |
| 484 | + | |
484 | 485 | | |
485 | | - | |
| 486 | + | |
486 | 487 | | |
487 | | - | |
| 488 | + | |
| 489 | + | |
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
| |||
0 commit comments