Skip to content

Add deploy-path test coverage for external pre-agg dimension_columns#2365

Merged
shangyian merged 2 commits into
DataJunction:mainfrom
shangyian:preagg-dimension-column-deploy-coverage
Jul 25, 2026
Merged

Add deploy-path test coverage for external pre-agg dimension_columns#2365
shangyian merged 2 commits into
DataJunction:mainfrom
shangyian:preagg-dimension-column-deploy-coverage

Conversation

@shangyian

Copy link
Copy Markdown
Collaborator

Summary

The dimension_columns mapping for externally-registered pre-aggregations (#2360) was only exercised through the POST /preaggs/register API path. The deployment/orchestrator path (used by dj push) had no coverage.

This adds a deployment-path test asserting that a pre-agg declared with dimension_columns binds each grain dimension to its physical column and that the generated measures SQL reads the mapped physical column (aliased back to the DJ name) instead of the DJ dimension name. It covers the two shapes a real external agg hits: a joined dimension's key satisfied by a differently-named parent foreign-key column, and a local fact column.

Test Plan

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

Deployment Plan

The dimension_columns mapping for externally-registered pre-aggregations
(DataJunction#2360) was only exercised through the POST /preaggs/register API path. The
deployment/orchestrator path — what `dj push` actually uses — had no coverage.

This adds a deployment-path test asserting that a pre-agg declared with
dimension_columns binds each grain dimension to its physical column and that
the generated measures SQL reads the mapped physical column (aliased back to
the DJ name) instead of the DJ dimension name. It covers the two shapes a real
external agg hits: a joined dimension's key satisfied by a differently-named
parent foreign-key column, and a local fact column.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit e90b4c0
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a648495f867e6000859a1fe

@shangyian
shangyian marked this pull request as ready for review July 25, 2026 10:13
@shangyian
shangyian merged commit 18f07bd into DataJunction:main Jul 25, 2026
21 checks passed
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