Skip to content

Mark registered pre-aggs EXTERNAL and guard against DJ materialization#2342

Draft
shangyian wants to merge 2 commits into
DataJunction:mainfrom
shangyian:preagg-yaml
Draft

Mark registered pre-aggs EXTERNAL and guard against DJ materialization#2342
shangyian wants to merge 2 commits into
DataJunction:mainfrom
shangyian:preagg-yaml

Conversation

@shangyian

Copy link
Copy Markdown
Collaborator

Summary

Adds an EXTERNAL MaterializationStrategy value and a nullable name column to pre_aggregation.

With this change, /preaggs/{id}/materialize and /preaggs/{id}/backfill now reject EXTERNAL pre-aggs, since DJ should never overwrite or backfill a table built and maintained by an external pipeline. EXTERNAL stays out of VALID_PREAGG_STRATEGIES so /preaggs/plan keeps rejecting it too.

Advances #2118.

Test Plan

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

Deployment Plan

Adds an EXTERNAL MaterializationStrategy value and a nullable `name` column
to pre_aggregation (Alembic migration pa0002external), and has
/preaggs/register set strategy=EXTERNAL and the optional name on the
pre-aggs it creates.

Guards: /preaggs/{id}/materialize and /preaggs/{id}/backfill now reject
EXTERNAL pre-aggs — DJ must never overwrite or backfill a table built and
maintained by an external pipeline. EXTERNAL stays out of
VALID_PREAGG_STRATEGIES so /preaggs/plan keeps rejecting it too.

The `name` handle is exposed on PreAggregationInfo for YAML-deploy
reconciliation and availability-by-name callbacks (PR 4 part 2).

Advances DataJunction#2118.

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

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 canceled.

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

test_materialization_info asserts the full strategy list; the new EXTERNAL
strategy adds an {'label': 'External', 'name': 'external'} entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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