Skip to content

Add FOCUS 1.3 ingestion (IngestionSetup_v1_3.kql)#2126

Draft
flanakin wants to merge 1 commit into
flanakin/focus14from
flanakin/focus14-phase1-ingestion-1.3
Draft

Add FOCUS 1.3 ingestion (IngestionSetup_v1_3.kql)#2126
flanakin wants to merge 1 commit into
flanakin/focus14from
flanakin/focus14-phase1-ingestion-1.3

Conversation

@flanakin
Copy link
Copy Markdown
Collaborator

@flanakin flanakin commented May 6, 2026

Summary

Phase 1 of FOCUS 1.4 work (parent: #2120). Adds FOCUS 1.3 ingestion support.

Files

  • NEW: src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_v1_3.kql (1949 lines, copied from v1_2 with the changes below)
  • MODIFIED: IngestionSetup_RawTables.kql — adds 8 new FOCUS 1.3 columns to `Costs_raw`
  • MODIFIED: app.bicep and .build.config — wires `IngestionSetup_v1_3.kql` into the Bicep deployment alongside v1_0 and v1_2

Cost and Usage column additions (FOCUS 1.3)

Column Type Source for back compat
AllocatedMethodId string (new — null if absent)
AllocatedMethodDetails dynamic (JSON) (new — null if absent)
AllocatedResourceId string (new — null if absent)
AllocatedResourceName string (new — null if absent)
AllocatedTags dynamic (JSON) (new — null if absent)
ContractApplied dynamic (JSON) (new — null if absent)
ServiceProviderName string falls back to deprecated `ProviderName` when empty
HostProviderName string falls back to deprecated `PublisherName` when empty

`ProviderName` and `PublisherName` are kept in the v1_3 schema (deprecated in 1.3, removed in 1.4 — phase 4).

What's NOT in this PR

  • HubSetup_v1_3.kql with versioned hub functions → phase 2 (separate PR). Until phase 2 lands, the unversioned `Costs()` still aliases to `Costs_v1_2()` and v1_3 ingested data is invisible to consumers via the public hub functions.
  • Contract Commitment supplemental dataset → phase 3.
  • Cost Management 1.3 export schema (`focuscost_1.3.json`) → out of scope; only updated when Cost Management ships an official 1.3 export.
  • Open-data `FocusCost_1.3.json` → phase 6.

Closes #2124

Test plan

  • Pester unit tests pass: `Invoke-Pester -Path src/powershell/Tests/Unit/HubsIngestionQueries.Tests.ps1` (192/192)
  • Bicep template compiles cleanly (covered by Pester suite)
  • Manual smoke test on a deployed hub: verify v1_3 raw + final tables created, ingestion of an existing FOCUS 1.2 export still lands cleanly in `Costs_final_v1_2` and the new columns in `Costs_final_v1_3` come through as null/empty.

Adds IngestionSetup_v1_3.kql with Costs/Prices/CommitmentDiscountUsage/
Recommendations/Transactions transforms and final tables renamed for
FOCUS 1.3. Cost and Usage gains 8 new FOCUS 1.3 columns:
AllocatedMethodId/Details/ResourceId/ResourceName/Tags (data-generator
split cost allocation), ContractApplied (per-row contract commitment
application), ServiceProviderName + HostProviderName (replacing the
deprecated ProviderName/PublisherName, with empty-fallback for back
compat).

Costs_raw now carries the new columns so downstream v1_2 transforms
keep working and v1_3 transforms can read them directly. The v1_3
file is wired into the Bicep deployment alongside v1_0 and v1_2.

The unversioned Costs() function still aliases to v1_2 — phase 2
adds Costs_v1_3() and retargets Latest.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed Tool: FinOps hubs Data pipeline solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants