Skip to content

Generate combined pre-aggregated measures SQL#1639

Merged
shangyian merged 1 commit intoDataJunction:mainfrom
shangyian:combiner-sql
Jan 8, 2026
Merged

Generate combined pre-aggregated measures SQL#1639
shangyian merged 1 commit intoDataJunction:mainfrom
shangyian:combiner-sql

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented Jan 8, 2026

Summary

This PR introduces a new endpoint /sql/measures/v3/combined that generates SQL combining multiple grain groups into a single query using FULL OUTER JOIN. This enables efficient materialization of pre-aggregated data from multiple fact tables into a single combined table.

When building Druid cubes or similar OLAP materialization pipelines, it's often necessary to combine metrics from different fact tables (e.g., orders and page views) into a single pre-aggregated table.

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 8, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 115bafc
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/695faf5e7ca2d50008632869

@shangyian shangyian changed the title Add support for generating combined pre-aggregated measures SQL Generate combined pre-aggregated measures SQL Jan 8, 2026
@shangyian shangyian marked this pull request as ready for review January 8, 2026 13:45
@shangyian shangyian merged commit 2d05655 into DataJunction:main Jan 8, 2026
17 checks passed
@shangyian shangyian deleted the combiner-sql branch January 8, 2026 13:45
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