Menu ▾ ▴

#29 [Design] Cube.js is a parallel/bypassed path, not the single semantic layer

closed
nobody
None
2026-06-13
2026-06-12
Anonymous
No

Originally created by: pyy3

Type: design / architecture clarification

Summary

The README architecture diagram presents Cube.js as the semantic layer between dbt and Frappe. In practice Cube is thin and partly bypassed:

  • cube/cube.js is effectively { schemaPath: '/cube/schema' }; schemas are generated by scripts/generate_cube_schemas.py.
  • The Frappe API (konsol/api.py / konsol/clickhouse.py) queries ClickHouse directly, not through Cube.

So there are two parallel read paths into ClickHouse (Cube SQL API and the Frappe direct path), and Cube is not the single semantic authority the diagram implies.

Why it matters

Metric definitions can diverge between the Cube schema and the hand-written SQL in the Frappe API, producing inconsistent numbers depending on which path a consumer uses. For an EPM product, "the same measure returns two values" is a credibility problem.

Suggested directions

  • Decide Cube's role explicitly: (a) the authoritative semantic layer that the Frappe API also routes through, or (b) an optional BI/ODBC convenience path, with the Frappe direct-SQL path as the source of truth.
  • Document the decision and align the architecture diagram with it.
  • If both paths stay, add a test asserting key measures agree across Cube and the direct API.

Related

Tickets: #34

Discussion

  • Anonymous

    Anonymous - 2026-06-13

    Originally posted by: pyy3

    Fixed in [#34] (merged to main).

     

    Related

    Tickets: #34

  • Anonymous

    Anonymous - 2026-06-13

    Ticket changed by: pyy3

    • status: open --> closed
     

Log in to post a comment.