Skip to content

Fixing grain of core member months #912

Description

@leighewarner

Describe the bug - Required
The member_months table is built at the person_id level instead of the member_id level. When a person enrolls in multiple plans (creating multiple member_ids), this causes duplicate person_id entries for the same month, leading to test failures due to unexpected data fanout.


Environment - Required

  • Tuva project package version (e.g. 0.6.0): 0.14.6
  • dbt version (e.g. 1.7): 1.9.4
  • dbt type (e.g. dbt cloud or dbt CLI): dbt cli
  • Data warehouse (e.g. Snowflake): Snowflake

To Reproduce
Steps to reproduce the behavior:

  1. create a person_id in the eligibility input layer that has multiple member_ids.
  2. Run the tuva project and specifically test the core_member_months table

Expected behavior
A clear and concise description of what you expected to happen.

I would expect that the core_member_month table have tests that ensure that each member_id + month is unique, rather than each person_id + month is unique.


Screenshots
If applicable, add screenshots to help explain your problem.

Image


Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status
🚧 Needs Scope

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions