Add FOCUS 1.4 hub functions (HubSetup_v1_4.kql)#2128
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>
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>
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>
…cus14-phase2-hubs-1.3
Renames HubSetup_v1_3.kql to HubSetup_v1_4.kql, consolidating all hub functions (including ContractCommitment) for FOCUS 1.4 GA. Updates HubSetup_Latest.kql to alias all unversioned functions to v1_4. Updates app.bicep and .build.config to reference v1_4. Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
…cus14-phase2-hubs-1.3
- 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>
|
🤖 [AI][Claude Code] PR Update Summary Cascade of PR #2126 feedback (#2126 review threads 1, 4, 5, 6):
Depends on PR #2126 (ingestion side). |
There was a problem hiding this comment.
Should this be in this PR? It's already in PR #2127
There was a problem hiding this comment.
Same comment: This is already in PR @2126
Do we want to review it here or there?
| // BillingPeriods_final_v1_4 | ||
| .create-or-alter function | ||
| with (docstring = 'Gets all billing periods aligned to FOCUS 1.4.', folder = 'BillingPeriods') | ||
| BillingPeriods_v1_4() |
There was a problem hiding this comment.
Sort this list alphabetically. BillingPeriods should be before CommitmentDiscountUsage and InvoiceDetails should be after Costs.
There was a problem hiding this comment.
We're missing the updates to the HubSetup_v1_0.kql and HubSetup_v1_2.kql functions to backport v1_4 data to those schemas.
| PricingCurrency, | ||
| PricingQuantity, | ||
| PricingUnit, | ||
| // ProviderName and PublisherName removed in FOCUS 1.4. Use ServiceProviderName / HostProviderName. |
There was a problem hiding this comment.
| // ProviderName and PublisherName removed in FOCUS 1.4. Use ServiceProviderName / HostProviderName. |
|
|
||
|
|
||
| //====================================================================================================================== | ||
| // Latest FOCUS version |
There was a problem hiding this comment.
This section doesn't belong in this file. It's in the HubSetup_Latest.kql file already
| with (docstring = 'Gets all commitment discount usage records aligned to FOCUS 1.4.', folder = 'CommitmentDiscountUsage') | ||
| CommitmentDiscountUsage_v1_4() | ||
| { | ||
| database('Ingestion').CommitmentDiscountUsage_final_v1_4 |
There was a problem hiding this comment.
| database('Ingestion').CommitmentDiscountUsage_final_v1_4 | |
| database('Ingestion').CommitmentDiscountUsage_final_v1_4 | |
| | union (database('Ingestion').CommitmentDiscountUsage_final_v1_2) |
| with (docstring = 'Gets all prices aligned to FOCUS 1.4.', folder = 'Prices') | ||
| Prices_v1_4() | ||
| { | ||
| database('Ingestion').Prices_final_v1_4 |
There was a problem hiding this comment.
| database('Ingestion').Prices_final_v1_4 | |
| database('Ingestion').Prices_final_v1_4 | |
| | union (database('Ingestion').Prices_final_v1_2) |
| with (docstring = 'Gets all recommendations aligned to FOCUS 1.4.', folder = 'Recommendations') | ||
| Recommendations_v1_4() | ||
| { | ||
| database('Ingestion').Recommendations_final_v1_4 |
There was a problem hiding this comment.
| database('Ingestion').Recommendations_final_v1_4 | |
| database('Ingestion').Recommendations_final_v1_4 | |
| | union (database('Ingestion').Recommendations_final_v1_2) |
| with (docstring = 'Gets all transactions aligned to FOCUS 1.4.', folder = 'Transactions') | ||
| Transactions_v1_4() | ||
| { | ||
| database('Ingestion').Transactions_final_v1_4 |
There was a problem hiding this comment.
| database('Ingestion').Transactions_final_v1_4 | |
| database('Ingestion').Transactions_final_v1_4 | |
| | union (database('Ingestion').Transactions_final_v1_2) |
Summary
HubSetup_v1_3.kql→HubSetup_v1_4.kql, consolidating all hub functions (including ContractCommitment) for FOCUS 1.4 GAHubSetup_Latest.kqlto alias all unversioned functions (Costs(),Prices(), etc.) to their_v1_4()counterpartsContractCommitment()unversioned alias inHubSetup_Latest.kqlapp.bicepand.build.configto referencev1_4hub scriptsTest plan
HubSetup_v1_4.kqlcontains functions for all datasets: CommitmentDiscountUsage, ContractCommitment, Costs, Prices, Recommendations, TransactionsHubSetup_Latest.kqlaliases all unversioned functions to_v1_4()Costs_v1_4()unionsCosts_final_v1_4,Costs_final_v1_2, andCosts_final_v1_0for backward compatibility🤖 Generated with Claude Code