-
Notifications
You must be signed in to change notification settings - Fork 32
feat: semi-additive measures #2502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2097c68
Add semi-additive metric declaration
betodealmeida 9b1763c
Attach semi-additive rules to metric components
betodealmeida 4a0b219
Support semi-additive metric collapse SQL
betodealmeida 695d900
Support semi-additive derived metrics
betodealmeida 4df21e6
Make pre-agg matching semi-additive aware
betodealmeida 1794871
Guard semi-additive materialization paths
betodealmeida 91d65f5
Fix cube materialization test isolation
betodealmeida 5bdd43b
Make _semi_additive_dimension_requested role-sensitive
betodealmeida 6fdeaac
Show in UI
betodealmeida a311a4e
Create/edit fields
betodealmeida 69a10a1
Fix current value on edit
betodealmeida b60fdf6
Use reaggregate instead
betodealmeida aca6f03
Prepare semi-additive metrics for review
betodealmeida 8abebf5
Fix generated schema and reaggregate test expectations
betodealmeida 73ab8f2
Increase coverage
betodealmeida 921d7b2
Fix reaggregate semantic fingerprint expectations
betodealmeida 5509f1e
Improvements
betodealmeida 3f69ec0
More fixes
betodealmeida 9c388d6
Increase coverage
betodealmeida 4cdd390
Remove top-level fn/weight
betodealmeida 902858f
Require fully qualified reaggregate dimensions
betodealmeida b2a95e1
Skip reaggregate validation for ordinary cubes
betodealmeida df6d938
Use source column instead of registry
betodealmeida 18f6db1
Refactor dimension ref split
betodealmeida 8a6c399
Add fail-closed guard for LIMITED leaf metrics
betodealmeida e51e913
Consistently strip reaggregate
betodealmeida d324650
Preserve protected reaggregation grain for filtered dimensions
betodealmeida 15d7f5c
Revert lock change
betodealmeida 24ac9b9
Reject reaggregation declarations on derived metrics during validation
betodealmeida c9ef0a1
Fix head
betodealmeida 109adf3
Fix tests
betodealmeida ec7761a
Fix coverage
betodealmeida 1f22459
Update reaggregation migration head
betodealmeida 49d5866
Fix test
betodealmeida File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...ver/alembic/versions/2026_08_24_0000-rg0001reaggregate_add_reaggregate_to_noderevision.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| """ | ||
| Add reaggregate column to noderevision | ||
|
|
||
| Revision ID: rg0001reaggregate | ||
| Revises: ck0001results | ||
| Create Date: 2026-08-24 00:00:00.000000+00:00 | ||
| """ | ||
|
|
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "rg0001reaggregate" | ||
| down_revision = "ck0001results" | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade(): | ||
| op.add_column( | ||
| "noderevision", | ||
| sa.Column("reaggregate", sa.JSON(), nullable=True), | ||
| ) | ||
|
|
||
|
|
||
| def downgrade(): | ||
| op.drop_column("noderevision", "reaggregate") |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.