feat(analytics): dimension labels + drill-through metadata for dataset reports#2080
Merged
Conversation
…t reports The dataset-bound report/table path enriched only MEASURE result fields with their display label, leaving dimension columns bare (renderers fell back to the raw field name e.g. "status"). It also offered no way to drill a grouped bucket back to its records. - Enrich DIMENSION result fields with their dataset display label (match by dimension name or underlying field), so headers read "Status" not "status". - Attach drill-through metadata to the dataset query result: the base `object`, a drillable dimension→field map, and a PARALLEL `drillRawRows` array holding each row's RAW grouped values (captured before label resolution overwrites `row[dim]`) so a host builds an exact-match filter from the stored value, not the display label. Rows themselves are left untouched. Date dimensions are excluded (a humanized bucket can't be exact-matched). - Showcase: `budget_sum`/`spent_sum` are currency fields with no declared currency, so drop the misleading hardcoded `$0,0` format for a plain `0,0`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 18, 2026
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.
Why
Reviewing the Chart Gallery report page surfaced gaps in the dataset-bound analytics path. Two are server-side:
queryDatasetenriched only measure result fields with a displaylabel; dimension columns came back bare, so renderers fell back tostatus/priority/accountinstead ofStatus/Priority/Account.row[dim]with the display label, so the raw stored value needed for an exact-match filter was lost.What
object, a drillabledimensionFieldsmap, and a paralleldrillRawRowsarray holding each row's RAW grouped values (snapshotted before label resolution). Rows themselves are untouched (no shape change for existing consumers). Date dimensions are excluded — a humanized bucket can't be exact-matched.budget_sum/spent_sumare currency fields with no declared currency, so the hardcoded$0,0format misrepresented the amount → changed to plain0,0.All carried as extra props on the result (no spec-contract change;
res.json(result)serializes verbatim).Tests
query-dataset.test.ts: drill metadata shape, raw-values array, dimension label enrichment, date-dimension exclusion. Full service-analytics suite green.Companion
Consumed by objectui PR
fix/dashboard-report-ux(renders the labels, currency, i18n, and drill UI).🤖 Generated with Claude Code