microsoft / microsoft/finops-toolkit
Costs() column reference has drifted from the deployed schema since hubs v12
@RolandKrummenacher is already working on this.
Since Sep 16, 2026.
- #2328 by @RolandKrummenacher — open
- Dominant language
- PowerShell
- Stars
- 603
- Forks
- 248
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 11
Description
🐛 Problem
The Costs() table in src/queries/finops-hub-database-guide.md has drifted from the deployed schema. The guide is read by the GenAI plugins and agents that build queries against a hub, so a column that is absent from the table is effectively a column the agent will not use, and a name the table still lists is one the agent will write into a query that then fails.
Checked against two unrelated hubs, which both return 155 columns from Costs():
- 27 columns the table does not list at all — including the FOCUS 1.2 additions
ServiceSubcategory,SkuMeter,SkuPriceDetails,CapacityReservationId,CapacityReservationStatus,CommitmentDiscountQuantity,CommitmentDiscountUnit,PricingCurrencyandInvoiceId. - 3 columns listed under names that hubs v12 renamed away from —
x_InvoiceId,x_PricingCurrency,x_SkuMeterName. Neither hub has them; both have the new names. - 1 type mismatch —
x_SkuLicenseQuantityis documented aslong; the deployed schema hasint. (docs-mslearn/toolkit/hubs/data-model.mdsaysStringfor the same column, so that file needs a look too.)
The renames are the ones announced in announce/2025/2025-08_non-breaking-changes-in-hubs-12.md:
Renamed x_InvoiceId -> InvoiceId
Renamed x_PricingCurrency -> PricingCurrency
Renamed x_SkuMeterName -> SkuMeter
Added ServiceSubcategory
Added SkuPriceDetails
So this is v12 drift rather than a disagreement about what the schema should be.
👣 Repro steps
Costs() | getschema | project ColumnName, ColumnType | order by ColumnName asc
Compare the result with the Costs() table in the guide.
🤔 Expected
The table reference matches what Costs() returns. Its own introduction says it "lists the columns produced in the All available columns query", and that query is Costs() plus a set of extend steps, so every Costs() column belongs in it.
🔧 Environment
- Affected file:
src/queries/finops-hub-database-guide.mdondev - FinOps hub version: v12 and later
ℹ️ Additional context
Descriptions for the missing columns already exist elsewhere in this repo — docs-mslearn/toolkit/help/data-dictionary.md for the FOCUS columns, and the Copilot Studio template's schema reference for the x_ ones — so filling the gaps needs no new definitions.
Two of them intersect existing issues and are worth a closer look during review: x_CommitmentDiscountSpendEligibility and x_CommitmentDiscountUsageEligibility, see #2279 and #2287.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/queries/finops-hub-database-guide.md and compare its Costs() table with the provided Costs() | getschema query. Check announce/2025/2025-08_non-breaking-changes-in-hubs-12.md, docs-mslearn/toolkit/help/data-dictionary.md, and docs-mslearn/toolkit/hubs/data-model.md for the renamed, missing, and mismatched entries. Done means the guide matches the deployed v12 schema and any related type discrepancy is reviewed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100