Skip to content

feat: widen pool source to per_entity_per_period facts#53

Merged
mohossam01 merged 1 commit into
mainfrom
feat/widen-pool-source-per-entity-per-period-fact
May 14, 2026
Merged

feat: widen pool source to per_entity_per_period facts#53
mohossam01 merged 1 commit into
mainfrom
feat/widen-pool-source-per-entity-per-period-fact

Conversation

@mohossam01
Copy link
Copy Markdown
Owner

What this PR does

Register scalar and vectorized dispatch handlers for pool.<attr> columns on per_entity_per_period fact tables — the most common fact grain, one row per entity per period. Each handler reads the row's entity from context and draws uniformly from its declared pool; the load-time pool-coverage validator widens to admit the new grain. A column like payment_type: pool.payment_method now coexists with SCD2 and CDC on a single transactional fact. Per_period facts, reference dims, and sub-entity dims stay out of scope — those rows have no per-row entity binding.

Files Modified

  • plotsim/tables.py
  • plotsim/validation.py
  • tests/test_pool_on_fact.py
  • tests/test_pool_attr.py
  • docs/site/column-types.md
  • docs/site/feature-reference.md
  • CHANGELOG.md

How to test

python -m pytest
python -m mkdocs build --strict

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mohossam01 mohossam01 merged commit 06ba652 into main May 14, 2026
6 checks passed
@mohossam01 mohossam01 deleted the feat/widen-pool-source-per-entity-per-period-fact branch May 14, 2026 10:03
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