docs(adr-0021): analytics — one semantic dataset layer, report/dashboard as pure presentation#1415
Merged
xuyushun441-sys merged 1 commit intoMay 31, 2026
Conversation
…ard as pure presentation Redesign the analytics surface from a clean sheet: introduce a single semantic `dataset` layer (a thin wrapper over the existing QuerySchema engine, declaring named dimensions + measures), and collapse `report` (pivot) and `dashboard` (canvas) into pure presentations that bind to a dataset by reference and select dimensions/measures by name. Kills the three inline single-object query grammars (Report.columns/ groupings, Widget.category/value/aggregate, ListChartConfig), unlocks joins everywhere, gives one source of truth per metric, and keeps Airtable-style ergonomics via inline-dataset desugaring. Records the dashboard→dataset (not dashboard→report) rationale and a report-embed widget for table-in-dashboard composition. Big-bang migration, no back-compat; one-time codemod.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
xuyushun441-sys
deleted the
docs/adr-0021-analytics-dataset-semantic-layer
branch
May 31, 2026 15:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Proposes ADR-0021: redesign the analytics surface from a clean sheet.
dataset— a thin wrapper over the existingQuerySchemaengine (packages/spec/src/data/query.zod.ts), declaring named dimensions and measures.report(pivot grid) anddashboard(widget canvas) into pure presentations that bind to a dataset by reference and pick dimensions/measures by name — never re-declaringobject/field/aggregate.Why
Today three surfaces each re-implement their own crippled, single-object inline query:
Report.columns/groupings,DashboardWidget.category/value/aggregate, andListChartConfig. That means no joins (half of enterprise reporting impossible), triple metric drift (revenue defined 3×), and no single source of truth (no drill-through / certification / reuse) — while a full join/aggregation/window engine already exists, unused, one layer down.Key decisions recorded
dataset; D2report→ pivot over a dataset; D3dashboardwidgets reference a dataset, select measures/dimensions by name.dataset, notreport—dashboard→reportis a symptom of having no semantic layer (Salesforce/ServiceNow); mature stacks (Power BI/Looker/dbt) bind tiles to the semantic layer. Includes maturity table + 4-point rationale + a report-embed widget for genuine table-in-dashboard composition.Status: Proposed — discussion doc only, no code/schema changes in this PR.