Skip to content

feat: YAML calculated_measures, self-joins, model prefix, .all() support#204

Closed
boringdata wants to merge 2 commits intomainfrom
fix/yaml-features-batch
Closed

feat: YAML calculated_measures, self-joins, model prefix, .all() support#204
boringdata wants to merge 2 commits intomainfrom
fix/yaml-features-batch

Conversation

@boringdata
Copy link
Owner

Summary

Closes #202, closes #115, closes #114, closes #136, closes #169

Test plan

  • test_yaml_calculated_measures — calc measures via YAML config
  • test_yaml_calculated_measures_simple_format — simple string format
  • test_yaml_all_window_aggregation.all() percent-of-total in YAML
  • test_yaml_self_joins — same model joined twice with different aliases (DuckDB)
  • test_model_prefix_in_with_dimensionst.carriers.name in with_dimensions after join
  • test_nullif_on_aggregation_regression — regression test for TypeError: unhashable type: 'dict' when using .nullif() on aggregations #169
  • 549 existing tests pass (no regressions)

🤖 Generated with Claude Code

boringdata and others added 2 commits March 9, 2026 13:32
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>
@boringdata
Copy link
Owner Author

Splitting into individual PRs per fix.

@boringdata boringdata closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment