Skip to content

Combine #206 and #207: YAML calculated_measures + model-prefix fixes#211

Open
hachej wants to merge 8 commits intomainfrom
fix/combined-206-207
Open

Combine #206 and #207: YAML calculated_measures + model-prefix fixes#211
hachej wants to merge 8 commits intomainfrom
fix/combined-206-207

Conversation

@hachej
Copy link
Collaborator

@hachej hachej commented Mar 11, 2026

This PR combines the changes from:

What I did:

Notes:

  • This avoids the cross-PR merge conflict when landing both changes separately.
  • Please use this PR as the single merge path for both changes.

boringdata and others added 8 commits March 9, 2026 14:28
Add `calculated_measures` section to YAML schema for derived metrics
that reference other measures by name. Expressions are evaluated at
runtime against MeasureScope, which also enables `.all()` for
percent-of-total window aggregation patterns.

Closes #202, closes #115

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add prefix-aware column navigation to ColumnScope and MeasureScope so
that dimension/measure lambdas can use model prefixes (e.g.,
`t.flights.carrier`) after joins. Previously this only worked in
`.filter()`. Also adds _DimensionTableProxy for dimension evaluation
with merged dimension map awareness.

Closes #136

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lent fallback

Proxy classes (_ColumnPrefixProxy, _DimPrefixProxy) now raise AttributeError
when a prefixed name isn't found, preventing silent resolution to unrelated
unprefixed columns. Also preserves AttributeError from proxy evaluation in
Dimension.__call__ for proper dependency resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	src/boring_semantic_layer/tests/test_yaml.py
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.

2 participants