docs: metric-view runtime endpoint#484
Merged
Merged
Conversation
Add a Metric views section to the analytics plugin docs covering the POST /api/analytics/metric/:key runtime endpoint: request body, the structured-request-to-SQL translation, the filter operator vocabulary, executor cache scopes, the SSE response envelope, and error/behavior cases. Also list the endpoint in the HTTP endpoints index. Runtime endpoint only; the React hook and its docs land with a later PR. Co-authored-by: Isaac Signed-off-by: Atila Fassina <atila@fassina.eu>
atilafassina
requested review from
calvarjorge and
Copilot
and removed request for
a team
July 20, 2026 14:56
Contributor
There was a problem hiding this comment.
Pull request overview
Adds documentation for the Analytics plugin’s new Metric Views runtime endpoint (POST /api/analytics/metric/:key), describing the request shape, SQL translation behavior, filter grammar/operator vocabulary, executor/cache scope, SSE response envelope, and error semantics.
Changes:
- Documented the new metric-view runtime endpoint, including request fields and validation constraints.
- Added a worked “request → SQL” example, including identifier quoting and parameter binding.
- Documented filter structure/operators, executor behavior, SSE response shape, and error cases.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…roup semantics Address Copilot review feedback on PR #484: - format: JSON is accepted as a deprecated alias for JSON_ARRAY; only Arrow formats are rejected on this route. - contains/notContains render as LIKE :param with the %...% wrapping in the bound value, not literal interpolation. - empty or: [] is rejected 400 while empty and: [] is a no-op. Co-authored-by: Isaac Signed-off-by: Atila Fassina <atila@fassina.eu>
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.
Stacked on #474 (base
mv-runtime).Documents the user-facing surface of the metric-view runtime that #474 adds — the
POST /api/analytics/metric/:keyendpoint — in the analytics plugin docs.What's here
A new Metric views section in
docs/docs/plugins/analytics.mdcovering:timeGrain/timeDimension, limit, format), with a field table.SELECT MEASURE(...) ... GROUP BY ALLthe plugin builds, noting FQN/identifier backtick-quoting and parameter binding.and/ortree and the full v1 operator vocabulary as a table, plus the cardinality/depth caps.app_service_principal(shared cache) vsuser(per-user OBO cache), fixed bymetric-views.json.warehouse_status→result), cross-linked to the existing warehouse-readiness docs.404/400/503responses, dormant-when-absent, and hot-reload on edit.Every SQL/JSON example is grounded in the runtime handler and the metric test suite, not invented.
Scope
metric-views.json, type generation) is already documented intype-generation.md#metric-view-types; this section links to it rather than repeating it.Verification
pnpm docs:build— succeeds, no broken-link/anchor errors.pnpm docs:check— clean.This pull request and its description were written by Isaac.