feat: YAML calculated_measures, self-joins, model prefix, .all() support#204
Closed
boringdata wants to merge 2 commits intomainfrom
Closed
feat: YAML calculated_measures, self-joins, model prefix, .all() support#204boringdata wants to merge 2 commits intomainfrom
boringdata wants to merge 2 commits intomainfrom
Conversation
The underlying bug was already fixed by the serialization and AggregationExpr refactors. This adds a targeted regression test. Closes #169 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Support `calculated_measures` section in YAML config for derived metrics that reference other measures by name (#202) - Support `.all()` window aggregations in YAML calculated_measures for percent-of-total patterns (#115) - Support self-joins in YAML by auto-aliasing when the same model is joined multiple times, and alias join names to match YAML keys (#114) - Support model prefix navigation (e.g., `t.flights.carrier`) in `with_dimensions()` and `with_measures()` after joins (#136) - Add prefix-aware column proxy to ColumnScope and MeasureScope Closes #202, closes #115, closes #114, closes #136 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
Splitting into individual PRs per fix. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
calculated_measuressection in YAML for derived metrics that reference other measures by name (e.g.,_.fraud_volume / _.transaction_volume).all()window aggregations in YAMLcalculated_measuresfor percent-of-total patterns (e.g.,_.total / _.all(_.total) * 100)t.flights.carrier) inwith_dimensions()andwith_measures()after joins, matching the behavior already available in.filter()TypeError: unhashable type: 'dict'when using.nullif()on aggregations #169: Add regression test for nullif on aggregations (already fixed)Closes #202, closes #115, closes #114, closes #136, closes #169
Test plan
test_yaml_calculated_measures— calc measures via YAML configtest_yaml_calculated_measures_simple_format— simple string formattest_yaml_all_window_aggregation—.all()percent-of-total in YAMLtest_yaml_self_joins— same model joined twice with different aliases (DuckDB)test_model_prefix_in_with_dimensions—t.carriers.namein with_dimensions after jointest_nullif_on_aggregation_regression— regression test forTypeError: unhashable type: 'dict'when using.nullif()on aggregations #169🤖 Generated with Claude Code