Add FOCUS 1.4 ingestion (IngestionSetup_v1_4.kql)#2126
Conversation
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>
Consolidates FOCUS 1.3 and 1.4 column additions into a single v1_4 ingestion setup file. Removes the intermediate v1_3 file, adds ContractCommitment_raw table definition, and updates app.bicep and .build.config to reference v1_4. Co-Authored-By: Claude <noreply@anthropic.com>
flanakin
left a comment
There was a problem hiding this comment.
Changes here need to also be applied to the other 3 FOCUS 1.4 PRs
| //====================================================================================================================== | ||
|
|
||
| // ContractCommitment_raw table -- Create the table if it doesn't exist | ||
| .create-merge table ContractCommitment_raw ( ignore: string ) |
There was a problem hiding this comment.
Shouldn't the base name be plural? This applies to all tables/functions/etc.
| .create-merge table ContractCommitment_raw ( ignore: string ) | |
| .create-merge table ContractCommitments_raw ( ignore: string ) |
There was a problem hiding this comment.
🤖 [AI][Claude Code] ✅ Implemented
Pluralized across the PR: ContractCommitment_raw → ContractCommitments_raw, ContractCommitment_transform_v1_4 → ContractCommitments_transform_v1_4, ContractCommitment_final_v1_4 → ContractCommitments_final_v1_4, the mapping name, retention/streaming policies, and the section header. FOCUS-spec column names (e.g., ContractCommitmentBenefitCategory) keep their singular prefix since they are spec-defined identifiers. Cascading the same rename to PR #2128 (hub functions) and PR #2135 (plugin docs).
| x_SourceName: string, // Hubs v1_3+ | ||
| x_SourceProvider: string, // Hubs v1_3+ | ||
| x_SourceType: string, // Hubs v1_3+ | ||
| x_SourceVersion: string // Hubs v1_3+ |
There was a problem hiding this comment.
| x_SourceName: string, // Hubs v1_3+ | |
| x_SourceProvider: string, // Hubs v1_3+ | |
| x_SourceType: string, // Hubs v1_3+ | |
| x_SourceVersion: string // Hubs v1_3+ | |
| x_SourceName: string, // Hubs v1_4+ | |
| x_SourceProvider: string, // Hubs v1_4+ | |
| x_SourceType: string, // Hubs v1_4+ | |
| x_SourceVersion: string // Hubs v1_4+ |
There was a problem hiding this comment.
🤖 [AI][Claude Code] ✅ Implemented
Updated // Hubs v1_3+ → // Hubs v1_4+ for all four x_Source* columns on ContractCommitments_raw.
| .alter table ContractCommitment_raw ( ignore: string ) | ||
|
|
||
| // ContractCommitment_raw table -- Redefine all columns | ||
| .alter table ContractCommitment_raw ( |
There was a problem hiding this comment.
Missing new columns in 1.4 (also impacts ingestion function and other PRs for HubSetup):
ContractCommitmentBenefitCategory
ContractCommitmentCreated
ContractCommitmentDiscountPercentage
ContractCommitmentDurationType
ContractCommitmentFulfillmentInterval
ContractCommitmentLastUpdated
ContractCommitmentLifecycleStatus
ContractCommitmentModel
ContractCommitmentOfferCategory
ContractCommitmentPaymentInterval
ContractCommitmentPaymentModel
ContractCommitmentPaymentUpfrontPercentage
ServiceProviderName
There was a problem hiding this comment.
🤖 [AI][Claude Code] ✅ Implemented
Added the 12 missing FOCUS 1.4 per-row contract-commitment columns to Costs_raw and Costs_final_v1_4, and projected them in Costs_transform_v1_4 using column_ifexists() for forward compat:
ContractCommitmentBenefitCategory, ContractCommitmentCreated, ContractCommitmentDiscountPercentage, ContractCommitmentDurationType, ContractCommitmentFulfillmentInterval, ContractCommitmentLastUpdated, ContractCommitmentLifecycleStatus, ContractCommitmentModel, ContractCommitmentOfferCategory, ContractCommitmentPaymentInterval, ContractCommitmentPaymentModel, ContractCommitmentPaymentUpfrontPercentage.
ServiceProviderName already exists at line 512, so it was left as-is. PR #2128 (hub functions) will receive the same column additions.
| @@ -359,6 +455,11 @@ | |||
|
|
|||
| // Costs_raw table -- Redefine all columns | |||
| .alter table Costs_raw ( | |||
There was a problem hiding this comment.
FOCUS 1.4 has a requirement to include ALL native columns. This will significantly bloat the table size for cross-cloud data. Given we don't have a full set of columns for this yet, we need to have a way to ingest any additional columns either by auto-accepting new columns on ingestion or dumping them into a single x_ column. We need to research options and weigh pros/cons. This can happen in a separate PR, but don't resolve this without a link to that PR.
There was a problem hiding this comment.
🤖 [AI][Claude Code] 🤔 Needs discussion
Filed a tracking issue to scope the research: #2159 — Research: Handle FOCUS 1.4 native-columns requirement to avoid raw table bloat. The issue captures the three candidate approaches (auto-accept new columns, single x_NativeColumns JSON, hybrid) and explicitly scopes implementation to a separate PR.
This PR ships the FOCUS 1.4 schema with the columns we know today; native-columns handling will follow #2159's resolution. Leaving this thread unresolved per your request until the follow-up PR is linked.
- Pluralize ContractCommitments_raw / _transform_v1_4 / _final_v1_4 / mapping / update policy - Add BillingPeriods_raw + IngestionSetup_v1_4 transforms/finals/policies (FOCUS 1.4 supplemental dataset) - Add InvoiceDetails_raw + IngestionSetup_v1_4 transforms/finals/policies (FOCUS 1.4 supplemental dataset) - Add 12 ContractCommitment* per-row columns + CommitmentProgramEligibilityDetails + InvoiceDetailId to Costs_raw, Costs_final_v1_4, and Costs_transform_v1_4 - Fix x_Source* annotations on ContractCommitments_raw to Hubs v1_4+ - Update Costs_raw ProviderName/PublisherName annotations to FOCUS 0.5-1.3 (removed in 1.4; kept for back compat) - Update Costs_raw Region annotation: deprecated -> removed - File #2159 for the FOCUS 1.4 native-columns architecture research 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 [AI][Claude Code] PR Update Summary Addressed: 7 thread(s)
Key changes:
Cascading next: Same pluralization + new BillingPeriods/InvoiceDetails datasets will be added to PRs #2128 (hub functions), #2135 (plugin docs), and #2136 (tests + changelog). |
- Rename ContractCommitment_v1_4() -> ContractCommitments_v1_4() (and update folder label) - Add BillingPeriods_v1_4() and InvoiceDetails_v1_4() hub functions - Add BillingPeriods(), ContractCommitments() (renamed), and InvoiceDetails() unversioned aliases in HubSetup_Latest.kql - Add CommitmentProgramEligibilityDetails + 12 ContractCommitment* + InvoiceDetailId column defaults to Costs_final_v1_0 and Costs_final_v1_2 union arms (back-compat shims) and add them to the project list 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
- Rename ContractCommitment() -> ContractCommitments() in skill references and agent docs - Add BillingPeriods() and InvoiceDetails() to the function list and dedicated agent doc sections - Mention the new FOCUS 1.4 per-row columns (CommitmentProgramEligibilityDetails, 12 ContractCommitment* columns, InvoiceDetailId) - Update output-style guidance to reference all three supplemental datasets 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
Tests: - Pluralize ContractCommitments_raw / _final_v1_4 / _v1_4 assertions - Assert new BillingPeriods_raw + InvoiceDetails_raw datasets exist with their FOCUS 1.4 columns - Assert new BillingPeriods_v1_4(), InvoiceDetails_v1_4(), ContractCommitments_v1_4() hub functions - Assert HubSetup_Latest aliases for BillingPeriods(), ContractCommitments(), InvoiceDetails() - Assert Costs_raw and Costs_final_v1_4 include the 14 new FOCUS 1.4 columns - Assert NO singular ContractCommitment_raw / ContractCommitment_v1_4 / ContractCommitment() exists - Assert Costs_raw keeps removed ProviderName/PublisherName/Region for back compat Changelog: - Expand v15.0.0 entry with the 14 new FOCUS 1.4 columns and the three new supplemental datasets (ContractCommitments, BillingPeriods, InvoiceDetails) - Update plugin entry to list ContractCommitments() / BillingPeriods() / InvoiceDetails() 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
Summary
IngestionSetup_v1_3.kql→IngestionSetup_v1_4.kql, consolidating all FOCUS 1.3 and 1.4 column additions into a single GA releaseContractCommitment_rawtable definition toIngestionSetup_RawTables.kqlapp.bicepand.build.configto referencev1_4(removesv1_3)Test plan
IngestionSetup_v1_4.kqlcontains transform functions, final tables, and update policies for all datasets: Prices, Costs, CommitmentDiscountUsage, ContractCommitment, Recommendations, Transactions.build.configFabric KQL includesIngestionSetup_v1_4.kql(not v1_3)🤖 Generated with Claude Code