microsoft / microsoft/finops-toolkit

Costs() column reference has drifted from the deployed schema since hubs v12

Open
#2,329 1 comment 0 reactions 0 assignees View on GitHub

@RolandKrummenacher is already working on this.

Since Sep 16, 2026.

  • #2328 by @RolandKrummenacher — open
Skill: Documentation Status: 🔬 Code review Tool: FinOps hubs Type: Bug 🐛
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, PricingCurrency and InvoiceId.
  • 3 columns listed under names that hubs v12 renamed away fromx_InvoiceId, x_PricingCurrency, x_SkuMeterName. Neither hub has them; both have the new names.
  • 1 type mismatchx_SkuLicenseQuantity is documented as long; the deployed schema has int. (docs-mslearn/toolkit/hubs/data-model.md says String for 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.md on dev
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.