Skip to content

Add FOCUS 1.3 hub functions (HubSetup_v1_3.kql)#2128

Draft
flanakin wants to merge 2 commits into
flanakin/focus14from
flanakin/focus14-phase2-hubs-1.3
Draft

Add FOCUS 1.3 hub functions (HubSetup_v1_3.kql)#2128
flanakin wants to merge 2 commits into
flanakin/focus14from
flanakin/focus14-phase2-hubs-1.3

Conversation

@flanakin
Copy link
Copy Markdown
Collaborator

@flanakin flanakin commented May 6, 2026

Summary

Phase 2 of FOCUS 1.4 work (parent: #2120). Adds the hub-side FOCUS 1.3 functions and retargets the unversioned aliases.

Stacked on phase 1 (#2126). Once phase 1 merges to `flanakin/focus14`, this PR's base is automatically retargeted by GitHub.

Files

  • NEW: `HubSetup_v1_3.kql` (619 lines, copied from v1_2 with renames + FOCUS 1.3 column adds + new v1_2 union arm)
  • MODIFIED: `HubSetup_Latest.kql` — aliases now point to `_v1_3()` instead of `_v1_2()`
  • MODIFIED: `app.bicep` and `.build.config` — wires `HubSetup_v1_3.kql` into the deployment

Functions added

  • `Costs_v1_3()` — unions `Costs_final_v1_3`, `Costs_final_v1_2` (with 1.3 column extends), and `Costs_final_v1_0` (with v1_0→v1_2 conversion + 1.3 column extends).
  • `Prices_v1_3()`, `CommitmentDiscountUsage_v1_3()`, `Recommendations_v1_3()`, `Transactions_v1_3()` — schema-equivalent to v1_2 (no FOCUS 1.3 changes for these datasets), renamed for consistency with the version family.

Backward compatibility

For v1_2 data unioned through `Costs_v1_3()`:

  • 8 new FOCUS 1.3 columns default to null/empty (`AllocatedMethodId/Details/ResourceId/ResourceName/Tags`, `ContractApplied`).
  • `ServiceProviderName` populated from `ProviderName`.
  • `HostProviderName` populated from `PublisherName`.

What's NOT in this PR

  • Contract Commitment hub function (phase 3, separate dataset).
  • FOCUS 1.4 (phases 4-5).

Closes #2127

Test plan

  • Pester unit tests pass: 192/192 in HubsIngestionQueries.Tests.ps1
  • Bicep template compiles cleanly
  • Manual smoke test: deploy hub, query `Costs()` and confirm v1_3 schema (8 new columns visible).
  • Manual smoke test: query `Costs_v1_2()` after deploying v1_3 — confirm v1_2 schema still returned.

flanakin and others added 2 commits May 6, 2026 08:07
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>
Adds HubSetup_v1_3.kql with Costs_v1_3, Prices_v1_3,
CommitmentDiscountUsage_v1_3, Recommendations_v1_3, and
Transactions_v1_3 that union the new Costs_final_v1_3 with the
existing Costs_final_v1_2 and Costs_final_v1_0 tables.

For v1_2 data unioned into the v1_3 view, the 8 new FOCUS 1.3 columns
default to null/empty and ServiceProviderName/HostProviderName are
populated from the deprecated ProviderName/PublisherName for back
compat. The same defaults apply to the v1_0 union arm on top of the
existing v1_0 -> v1_2 conversion.

HubSetup_Latest.kql aliases now point to *_v1_3 functions so the
unversioned Costs(), Prices(), etc. return the latest schema.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 15:22
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs: Review 👀 PR that is ready to be reviewed label May 6, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Tool: FinOps hubs Data pipeline solution label May 6, 2026
@flanakin flanakin changed the base branch from flanakin/focus14-phase1-ingestion-1.3 to flanakin/focus14 May 6, 2026 23:00
@flanakin flanakin marked this pull request as draft May 6, 2026 23:16
@flanakin flanakin added this to the v15 milestone May 15, 2026
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