Commit 9f1a577
fix(open-data,hubs): align commitment discount eligibility with FOCUS categories
x_CommitmentDiscountSpendEligibility reported reservation pricing and
x_CommitmentDiscountUsageEligibility reported savings plan pricing, which is
the reverse of the FOCUS CommitmentDiscountCategory definition the toolkit
uses everywhere else: a reservation is a Usage commitment (a quantity of
usage) and a savings plan is a Spend commitment (an amount of money).
Fixes the four components that carried the swap:
- Update-CommitmentDiscountEligibility.ps1: the mapping moves into a new
New-EligibilityRow helper so a unit test can pin the direction.
- CommitmentDiscountEligibility.csv: the two columns are swapped for all
92,624 meters (36,287 rows change value). Verified against the Retail
Prices API for a stratified sample of 12 meters covering all three value
combinations.
- IngestionSetup_v1_0.kql / IngestionSetup_v1_2.kql: the spend column now
reads spMeters and the usage column reads riMeters. The
"TODO: Check this to ensure it's correct" comment on the v1_2 block is
resolved. The exclusion of reservation price rows from their own
eligibility travels with riMeters.
- open-data.md: corrects the two column descriptions and the sample rows.
The best practice query in compute.md already used the correct mapping and
is unchanged.
This is a breaking change for consumers: the column names stay the same and
the values change, so existing reports and queries return different results.
Both changelog entries call that out.
Fixes #2279
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 298f792 commit 9f1a577
7 files changed
Lines changed: 36407 additions & 36309 deletions
File tree
- docs-mslearn/toolkit
- src
- open-data
- powershell/Tests/Unit
- scripts
- templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
0 commit comments