# Part D plan dimension (CMS SPUF)

`drug_silver.dim_part_d_plan` · Drugs and formularies · status live · 160,922 rows

The Part D plan-identity dim from CMS SPUF: the plan -> formulary bridge and carrier/plan attribution for the whole SPUF family. Columns (from DIM_PART_D_PLAN_SCHEMA in pipelines/drug/silver/spuf_writers.py): contract_name, plan_name, formulary_id, premium, deductible, ma_region_code, pdp_region_code, snp, plan_suppressed_yn, plan_type, plus the is_current vintage flag. Resolve contract_id/plan_id -> formulary_id here before joining fact_drug_formulary. Geography (state, county_code) is NOT here — it moved to fact_part_d_plan_service_area on 2026-05-17 after Gate A.5 caught 4,587 PK collisions (one dim row was being written once per served county).

**Grain.** One row per (contract_id, plan_id, segment_id, report_quarter).

| column | type | meaning |
|---|---|---|
| contract_id | string |  |
| plan_id | string |  |
| segment_id | string |  |
| report_quarter | string |  |
| contract_name | string |  |
| plan_name | string |  |
| formulary_id | string |  |
| premium | double |  |
| deductible | double |  |
| ma_region_code | string |  |
| pdp_region_code | string |  |
| snp | string |  |
| plan_suppressed_yn | boolean |  |
| plan_type | string |  |
| observed_period | date |  |
| asserted_at | date |  |
| effective_period_start | date |  |
| effective_period_end | date |  |
| cms_vintage_sequence | int |  |
| parse_revision | int |  |
| parser_artifact_hash | string |  |
| source_url | string |  |
| sha256_content_hash | string |  |
| source_id | string |  |
| is_current | boolean |  |
| bronze_object_key | string |  |
| s3_version_id | string |  |
| vintage_tag | string |  |
| drug_source_version_id | string |  |

Tools that read it: formulary_churn

Query it: `query_substrate` with `SELECT ... FROM drug_silver.dim_part_d_plan WHERE ... LIMIT 100`; read `describe_data_source("drug_silver.dim_part_d_plan")` first.
