Skip to content

Add Docs on Supported Metrics#1720

Merged
shangyian merged 3 commits intoDataJunction:mainfrom
shangyian:default-value-yaml-docs
Jan 27, 2026
Merged

Add Docs on Supported Metrics#1720
shangyian merged 3 commits intoDataJunction:mainfrom
shangyian:default-value-yaml-docs

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented Jan 27, 2026

Summary

Expands the metrics documentation with more complete coverage of all supported aggregation functions and derived metric patterns.

New Sections Added

  • Supported Aggregation Functions - Documents all aggregation functions with examples:
    • Fully aggregatable: SUM, COUNT, COUNT_IF, MIN, MAX, AVG, ANY_VALUE, APPROX_COUNT_DISTINCT
    • Statistical: VAR_POP, VAR_SAMP, STDDEV_POP, STDDEV_SAMP, COVAR_POP, COVAR_SAMP, CORR
    • Non-aggregatable: MAX_BY, MIN_BY
    • DISTINCT aggregations and their limited aggregability
  • Derived Metrics - Covers supported patterns:
    • Simple derived metrics (arithmetic combinations)
    • Cross-fact ratio metrics (numerator/denominator from different facts)
    • Period-over-period metrics (WoW, YoY using conditional aggregation or window functions)
    • Trailing N-day metrics (rolling windows)
    • Share of total metrics (with clear note about limited support and link to Support Multi-Scope Ratio Metrics #1695)
  • Conditional Aggregations - Using CASE WHEN inside aggregations
  • Metric Metadata - Documents required_dimensions, direction, and units

Other Changes

  • Fixed "Define Metrics Using SQL" link on landing page to point to metrics docs
  • Fixed YAML docs link in overview.md

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 27, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 61d43e1
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6978f10d27e4470008fe5852

@shangyian shangyian marked this pull request as ready for review January 27, 2026 17:08
@shangyian shangyian force-pushed the default-value-yaml-docs branch from c489450 to 61d43e1 Compare January 27, 2026 17:08
@shangyian shangyian merged commit 270cc9a into DataJunction:main Jan 27, 2026
17 checks passed
@shangyian shangyian deleted the default-value-yaml-docs branch January 27, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant