> For the complete documentation index, see [llms.txt](https://docs.dataplex-consulting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dataplex-consulting.com/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-part-d-spending-by-drug.md).

# Medicare Part D Spending by Drug

Part of the [CMS Data Feeds Dataset](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog.md) › Medicare

Dataplex delivers this CMS feed as the analysis-ready table `DWV.MEDICARE_PART_D_SPENDING_BY_DRUG` on Snowflake and Databricks — four annual reporting periods (2021–2024) aligned to a single schema, refreshed automatically whenever CMS publishes a new file. Every row carries lineage back to the exact CMS source file that produced it.

## Key facts

|                    |                                                       |
| ------------------ | ----------------------------------------------------- |
| **Snowflake**      | `DWV.MEDICARE_PART_D_SPENDING_BY_DRUG`                |
| **Databricks**     | `cms_dwv.medicare_part_d_spending_by_drug`            |
| **Coverage**       | Jan 2021 – Dec 2024 (4 of 4 annual reporting periods) |
| **Rows**           | 56,485 (total across all reporting periods)           |
| **Cadence**        | Annual                                                |
| **Update pattern** | Time-partitioned — each file adds one reporting year  |
| **CMS published**  | 2026-06-25                                            |
| **Loaded**         | 2026-06-25                                            |
| **Columns**        | 76 data + 6 lineage                                   |
| **File versions**  | 4                                                     |
| **License**        | CMS public data — U.S. Government work                |
| **Platforms**      | Snowflake Marketplace · Databricks Delta Sharing      |

Included in the CMS Data Feeds Dataset — [start a free trial on Snowflake Marketplace](https://app.snowflake.com/marketplace/listing/GZT1Z125KDH/dataplex-consulting-data-products-cms-data-feeds-dataset).

{% hint style="success" %}
**Current** — CMS last published this feed on 2026-06-25. Coverage is complete through the 2024 reporting year. Next CMS release expected \~Jun 2027.
{% endhint %}

{% hint style="info" %}
**Time-partitioned feed** — each file version covers one reporting year, so history is additive. Query the full table for all years; filter on the reporting period columns for a single period. Do **not** filter to the latest file only — that would return just the 2024 reporting year.
{% endhint %}

## Sample queries

{% tabs %}
{% tab title="Snowflake" %}

```sql
-- Each file version covers one reporting period (2021, 2022, 2023, 2024) — history is additive
SELECT *
FROM DWV.MEDICARE_PART_D_SPENDING_BY_DRUG
LIMIT 100;
```

{% endtab %}

{% tab title="Databricks" %}

```sql
-- Each file version covers one reporting period (2021, 2022, 2023, 2024) — history is additive
SELECT *
FROM cms_dwv.medicare_part_d_spending_by_drug
LIMIT 100;
```

{% endtab %}
{% endtabs %}

## About this feed

> The Medicare Part D by Drug dataset presents information on spending for drugs prescribed to Medicare beneficiaries enrolled in Part D by physicians and other healthcare providers. Drugs prescribed in the Medicare Part D program are drugs patients generally administer themselves.
>
> The dataset focuses on average spending per dosage unit and change in average spending per dosage unit over time. It also includes spending information for manufacturer(s) of the drugs as well as consumer-friendly information of drug uses and clinical indications.
>
> Drug spending metrics for Part D drugs are based on the gross drug cost, which represents total spending for the prescription claim, including Medicare, plan, and beneficiary payments. The Part D spending metrics do not reflect any manufacturers’ rebates or other price concessions as CMS is prohibited from publicly disclosing such information.
>
> — *Source: CMS feed metadata*

**Keywords:** Medicare, Medicare Prescription Drug, Medical Suppliers & Equipment, Drugs **Theme:** Medicare

## Coverage timeline

2021 🟩 · 2022 🟩 · 2023 🟩 · 2024 🟩

4 of 4 annual reporting periods present — no gaps.

## Release history

| Reporting period        | CMS published | Loaded     | Latest file |
| ----------------------- | ------------- | ---------- | ----------- |
| 2024-01-01 – 2024-12-31 | 2026-06-25    | 2026-06-25 | ✓           |
| 2023-01-01 – 2023-12-31 | 2025-05-29    | 2025-05-29 |             |
| 2022-01-01 – 2022-12-31 | 2024-03-14    | 2024-03-14 |             |
| 2021-01-01 – 2021-12-31 | 2023-03-06    | 2023-08-29 |             |

## Data dictionary

<details>

<summary>📋 <strong>76 data columns + 6 lineage columns</strong></summary>

Column-level definitions are maintained by CMS in the official [Medicare Part D Spending by Drug data dictionary](https://data.cms.gov/resources/medicare-part-d-spending-by-drug-data-dictionary).

**Data columns**

| Column                            | Type   |
| --------------------------------- | ------ |
| `BRND_NAME`                       | TEXT   |
| `GNRC_NAME`                       | TEXT   |
| `TOT_MFTR`                        | NUMBER |
| `MFTR_NAME`                       | TEXT   |
| `TOT_SPNDNG_2019`                 | NUMBER |
| `TOT_DSG_UNTS_2019`               | NUMBER |
| `TOT_CLMS_2019`                   | NUMBER |
| `TOT_BENES_2019`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2019` | NUMBER |
| `AVG_SPND_PER_CLM_2019`           | NUMBER |
| `AVG_SPND_PER_BENE_2019`          | NUMBER |
| `OUTLIER_FLAG_2019`               | NUMBER |
| `TOT_SPNDNG_2020`                 | NUMBER |
| `TOT_DSG_UNTS_2020`               | NUMBER |
| `TOT_CLMS_2020`                   | NUMBER |
| `TOT_BENES_2020`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2020` | NUMBER |
| `AVG_SPND_PER_CLM_2020`           | NUMBER |
| `AVG_SPND_PER_BENE_2020`          | NUMBER |
| `OUTLIER_FLAG_2020`               | NUMBER |
| `TOT_SPNDNG_2021`                 | NUMBER |
| `TOT_DSG_UNTS_2021`               | NUMBER |
| `TOT_CLMS_2021`                   | NUMBER |
| `TOT_BENES_2021`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2021` | NUMBER |
| `AVG_SPND_PER_CLM_2021`           | NUMBER |
| `AVG_SPND_PER_BENE_2021`          | NUMBER |
| `OUTLIER_FLAG_2021`               | NUMBER |
| `TOT_SPNDNG_2022`                 | NUMBER |
| `TOT_DSG_UNTS_2022`               | NUMBER |
| `TOT_CLMS_2022`                   | NUMBER |
| `TOT_BENES_2022`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2022` | NUMBER |
| `AVG_SPND_PER_CLM_2022`           | NUMBER |
| `AVG_SPND_PER_BENE_2022`          | NUMBER |
| `OUTLIER_FLAG_2022`               | NUMBER |
| `TOT_SPNDNG_2023`                 | NUMBER |
| `TOT_DSG_UNTS_2023`               | NUMBER |
| `TOT_CLMS_2023`                   | NUMBER |
| `TOT_BENES_2023`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2023` | NUMBER |
| `AVG_SPND_PER_CLM_2023`           | NUMBER |
| `AVG_SPND_PER_BENE_2023`          | NUMBER |
| `OUTLIER_FLAG_2023`               | NUMBER |
| `CHG_AVG_SPND_PER_DSG_UNT_22_23`  | NUMBER |
| `CAGR_AVG_SPND_PER_DSG_UNT_19_23` | NUMBER |
| `TOT_SPNDNG_2018`                 | NUMBER |
| `TOT_SPNDNG_2017`                 | NUMBER |
| `TOT_DSG_UNTS_2018`               | NUMBER |
| `TOT_DSG_UNTS_2017`               | NUMBER |
| `TOT_CLMS_2018`                   | NUMBER |
| `TOT_CLMS_2017`                   | NUMBER |
| `TOT_BENES_2018`                  | NUMBER |
| `TOT_BENES_2017`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2018` | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2017` | NUMBER |
| `AVG_SPND_PER_CLM_2018`           | NUMBER |
| `AVG_SPND_PER_CLM_2017`           | NUMBER |
| `AVG_SPND_PER_BENE_2018`          | NUMBER |
| `AVG_SPND_PER_BENE_2017`          | NUMBER |
| `OUTLIER_FLAG_2018`               | NUMBER |
| `OUTLIER_FLAG_2017`               | NUMBER |
| `CHG_AVG_SPND_PER_DSG_UNT_21_22`  | TEXT   |
| `CHG_AVG_SPND_PER_DSG_UNT_20_21`  | NUMBER |
| `CAGR_AVG_SPND_PER_DSG_UNT_18_22` | TEXT   |
| `CAGR_AVG_SPND_PER_DSG_UNT_17_21` | TEXT   |
| `TOT_SPNDNG_2024`                 | NUMBER |
| `TOT_DSG_UNTS_2024`               | NUMBER |
| `TOT_CLMS_2024`                   | NUMBER |
| `TOT_BENES_2024`                  | NUMBER |
| `AVG_SPND_PER_DSG_UNT_WGHTD_2024` | NUMBER |
| `AVG_SPND_PER_CLM_2024`           | NUMBER |
| `AVG_SPND_PER_BENE_2024`          | NUMBER |
| `OUTLIER_FLAG_2024`               | NUMBER |
| `CHG_AVG_SPND_PER_DSG_UNT_23_24`  | NUMBER |
| `CAGR_AVG_SPND_PER_DSG_UNT_20_24` | NUMBER |

**Lineage columns** (present on every feed table)

| Column         | Type           | Description                                  |
| -------------- | -------------- | -------------------------------------------- |
| `ROW_ID`       | TEXT           | Unique row ID for this table (PK)            |
| `FILE_ID`      | TEXT           | Source file — joins to `FEEDS_FILES.ID` (FK) |
| `FILE_FEED_ID` | TEXT           | Parent feed — joins to `FEEDS.ID` (FK)       |
| `FILE_NAME`    | TEXT           | Source file name as published by CMS         |
| `ROWNUM`       | NUMBER         | Row number within the source file            |
| `CREATED_AT`   | TIMESTAMP\_NTZ | Timestamp when the record was loaded         |

</details>

## Row-level lineage

Every row in this table traces to the exact CMS source file that produced it. The `FILE_ID` column joins to the `FEEDS_FILES` catalog table, and `FILE_FEED_ID` joins to the `FEEDS` master table:

```mermaid
erDiagram
    FEEDS ||--o{ FEEDS_FILES : "ID = FEED_ID"
    FEEDS ||--o{ MEDICARE_PART_D_SPENDING_BY_DRUG : "ID = FILE_FEED_ID"
    FEEDS_FILES ||--o{ MEDICARE_PART_D_SPENDING_BY_DRUG : "ID = FILE_ID"

    FEEDS {
        text ID PK
        text TITLE
        text VIEW_NAME
        text ACCURAL_PERIODICITY
    }
    FEEDS_FILES {
        text ID PK
        text FEED_ID FK
        date TEMPORAL_START
        date TEMPORAL_END
        date CMS_FEED_MODIFIED
        number IS_LATEST
    }
    MEDICARE_PART_D_SPENDING_BY_DRUG {
        text ROW_ID PK
        text FILE_ID FK
        text FILE_FEED_ID FK
        text BRND_NAME
        text GNRC_NAME
        number TOT_MFTR
        text MFTR_NAME
        number remaining_72_data_columns
    }
```

Trace any row back to its source file and reporting period:

```sql
SELECT d.BRND_NAME, d.GNRC_NAME, d.TOT_MFTR,
       ff.TEMPORAL_START, ff.TEMPORAL_END, ff.CMS_FEED_MODIFIED
FROM DWV.MEDICARE_PART_D_SPENDING_BY_DRUG d
JOIN DWV.FEEDS_FILES ff ON d.FILE_ID = ff.ID;
```

## Source & provenance

Published by the **Centers for Medicare & Medicaid Services** (bureau 009:38).

* [Official CMS data dictionary](https://data.cms.gov/resources/medicare-part-d-spending-by-drug-data-dictionary)
* [Medicare Part D Spending by Drug Methodology](https://data.cms.gov/resources/medicare-part-d-spending-by-drug-methodology)

## Frequently asked questions

### How often is Medicare Part D Spending by Drug updated?

Annually. CMS last published this feed on 2026-06-25, and Dataplex loaded it to the warehouse the same day. New releases are added automatically when CMS publishes them.

### What years does Medicare Part D Spending by Drug cover?

2021 through 2024 — four annual reporting periods with no gaps. Each reporting year arrives as its own file version, and all years remain queryable side by side.

### How many records are in Medicare Part D Spending by Drug?

56,485 rows across all four reporting periods. Because this feed is time-partitioned, the full table total is the meaningful count — no deduplication needed.

### How do I get Medicare Part D Spending by Drug data?

It's included in the CMS Data Feeds Dataset on the [Snowflake Marketplace](https://app.snowflake.com/marketplace/listing/GZT1Z125KDH/dataplex-consulting-data-products-cms-data-feeds-dataset) (free trial available) and via [Databricks Delta Sharing](https://checkout.dataplex-consulting.com/b/3cIdR2e1J59Sh2w7pWbQY00). Once mounted, query `DWV.MEDICARE_PART_D_SPENDING_BY_DRUG` directly — no pipeline setup required.

## Related feeds

{% content-ref url="/pages/S5HETabcZzMHMLD6jbCz" %}
[Medicare Quarterly Part D Spending by Drug](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-quarterly-part-d-spending-by-drug.md)
{% endcontent-ref %}

{% content-ref url="/pages/L6LJVEBqrN0qUVMZz34f" %}
[Medicare Part D Opioid Prescribing Rates - by Geography](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-part-d-opioid-prescribing-rates-by-geography.md)
{% endcontent-ref %}

{% content-ref url="/pages/S696BTb9VK7JkeRV2a52" %}
[Medicare Part D Prescribers - by Geography and Drug](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-part-d-prescribers-by-geography-and-drug.md)
{% endcontent-ref %}

{% content-ref url="/pages/3Gpjb984k3o8xLswelN4" %}
[Medicare Part D Prescribers - by Provider](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-part-d-prescribers-by-provider.md)
{% endcontent-ref %}

{% content-ref url="/pages/pV6JFrDKrRy3OgkAJ8RK" %}
[Medicare Part D Prescribers - by Provider and Drug](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-part-d-prescribers-by-provider-and-drug.md)
{% endcontent-ref %}

## Get this feed

1. [Start a free trial on Snowflake Marketplace](https://app.snowflake.com/marketplace/listing/GZT1Z125KDH/dataplex-consulting-data-products-cms-data-feeds-dataset) or purchase via [Databricks](https://checkout.dataplex-consulting.com/b/3cIdR2e1J59Sh2w7pWbQY00)
2. Mount the share — the database and `DWV` schema appear in your account immediately
3. Run the [sample query](#sample-queries) above — no ETL, no pipeline maintenance

Questions about this feed? Contact us at <notifications@dataplex-consulting.com>.

***

Part of the [CMS Data Feeds Dataset](/data-catalog/cms-data-feeds-dataset.md) — 280+ feeds · 245B+ records · updated daily. [Back to the full catalog →](/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog.md#medicare-part-d-spending-by-drug)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dataplex-consulting.com/data-catalog/cms-data-feeds-dataset/cms-data-feeds-catalog/medicare-part-d-spending-by-drug.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
