Skip to content

FOCUS 1.4 phase 2: add FOCUS 1.3 hub functions (HubSetup_v1_3.kql) #2127

@flanakin

Description

@flanakin

Parent: #2120
Depends on: #2124 (phase 1 ingestion)

Goal

Add the hub-side counterpart to phase 1: a new `HubSetup_v1_3.kql` exposing FOCUS 1.3-shaped functions (`Costs_v1_3()`, `Prices_v1_3()`, `CommitmentDiscountUsage_v1_3()`, `Recommendations_v1_3()`, `Transactions_v1_3()`), plus update `HubSetup_Latest.kql` so the unversioned `Costs()` and friends alias to v1_3.

Backward compatibility: `Costs_v1_3()` unions data from `Costs_final_v1_3`, `Costs_final_v1_2`, and `Costs_final_v1_0`, transforming the older shapes up to v1_3 (extending the existing v1_2 → v1_0 union pattern).

Scope

File: `HubSetup_v1_3.kql` (new)

  1. Copy `HubSetup_v1_2.kql` as the starting point.
  2. Rename functions: `_v1_2` → `_v1_3`. Update docstring "FOCUS 1.2" → "FOCUS 1.3".
  3. Update each `Costs_v1_3()`, `Prices_v1_3()`, etc. function to union the new `*_final_v1_3` table.
  4. Up-convert v1_2 and v1_0 data to v1_3 shape:
    • For `Costs`: extend with empty/null defaults for the 8 new FOCUS 1.3 columns; populate `ServiceProviderName` from `ProviderName` and `HostProviderName` from `PublisherName` for 1.0/1.2 data.

File: `HubSetup_Latest.kql` (modify)

Update the latest-aliases to point at `_v1_3()` instead of `_v1_2()`.

Files: `app.bicep` and `.build.config`

Wire in `HubSetup_v1_3.kql` alongside the existing versioned scripts.

Out of scope

  • Contract Commitment dataset (phase 3)
  • FOCUS 1.4 (phases 4-5)

Branch

`flanakin/focus14-phase2-hubs-1.3` off `flanakin/focus14`. PR target: `flanakin/focus14`.

Done when

  • New file deploys cleanly (Bicep compile passes).
  • Existing 192 Pester tests still pass.
  • Unversioned `Costs()` returns the v1_3 schema (8 new columns visible).
  • v1_2 data still queryable via `Costs_v1_2()` and via `Costs()` (up-converted).
  • PR opened against `flanakin/focus14`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions