microsoft / microsoft/finops-toolkit
FOCUS 1.4 phase 3: add ContractCommitment dataset
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 603
- Forks
- 248
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 11
Description
Parent: #2120
Depends on: #2124 (phase 1) and #2127 (phase 2)
Goal
Add the FOCUS 1.3 Contract Commitment supplemental dataset across raw ingestion, transforms, hub functions, and the Latest aliases.
FOCUS 1.3 Contract Commitment columns (14 mandatory)
| Column | Type | Description |
|---|---|---|
| BillingCurrency | string | ISO 4217 |
| ContractCommitmentId | string | Unique commitment identifier |
| ContractCommitmentType | string | Provider-specific type |
| ContractCommitmentCategory | string | Spend or Usage |
| ContractCommitmentCost | real | Monetary value (nullable for Usage) |
| ContractCommitmentQuantity | real | Quantity (nullable for Spend) |
| ContractCommitmentUnit | string | Unit of measure |
| ContractCommitmentPeriodStart | datetime | Inclusive start |
| ContractCommitmentPeriodEnd | datetime | Exclusive end |
| ContractId | string | Parent contract identifier |
| ContractPeriodStart | datetime | Inclusive start |
| ContractPeriodEnd | datetime | Exclusive end |
| InvoiceIssuerName | string | Statement issuer |
| PricingCurrency | string | Pricing currency |
Scope
`IngestionSetup_RawTables.kql`
- Add new table `ContractCommitment_raw` mirroring the column shape above (all string types in raw, parsed in transform).
`IngestionSetup_v1_3.kql`
- Add `ContractCommitment_transform_v1_3()` function: trivially passes through raw columns to typed final columns.
- Add `ContractCommitment_final_v1_3` table with the 14 columns above plus standard hub add-ons (`x_IngestionTime`, `x_SourceName`, `x_SourceProvider`, `x_SourceType`, `x_SourceVersion`).
- Add update policy `ContractCommitment_raw` -> `ContractCommitment_transform_v1_3` -> `ContractCommitment_final_v1_3`.
`HubSetup_v1_3.kql`
- Add `ContractCommitment_v1_3()` function reading `ContractCommitment_final_v1_3` directly. No older versions to union.
`HubSetup_Latest.kql`
- Add unversioned `ContractCommitment()` aliasing to `ContractCommitment_v1_3()`.
Branch
`flanakin/focus14-phase3-contractcommitment` off `flanakin/focus14-phase2-hubs-1.3` (depends on phase 2 for the v1_3 hub schema). PR target: `flanakin/focus14-phase2-hubs-1.3` until phase 2 merges, then will retarget.
Done when
- New raw, final, and hub tables / functions land.
- Pester tests still pass.
- Bicep compiles cleanly.
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 by comparing the requested changes with the existing patterns in IngestionSetup_RawTables.kql, IngestionSetup_v1_3.kql, HubSetup_v1_3.kql, and HubSetup_Latest.kql, using the phase 2 branch as the schema reference. Run the Pester tests and compile the Bicep configuration; done means the raw, final, hub, and Latest ContractCommitment objects exist and both checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100