diff --git a/docs-mslearn/toolkit/changelog.md b/docs-mslearn/toolkit/changelog.md index db543056d..a5c83863d 100644 --- a/docs-mslearn/toolkit/changelog.md +++ b/docs-mslearn/toolkit/changelog.md @@ -49,6 +49,7 @@ _Released August 2025_ - Fixed all Bicep compilation errors and warnings with inline suppressions and descriptive comments. - Fixed Build-Toolkit.ps1 bicep generate-params command bug. - Fixed Azure Data Explorer dashboard queries by converting `todecimal(0)` to `toreal(0)` to ensure compatibility with KQL type system ([#1893](https://github.com/microsoft/finops-toolkit/issues/1893)). + - Fixed backward compatibility in `Costs_transform_v1_2()` to support Cost Management exports that predate FOCUS 1.2 by adding fallback mappings for `PricingCurrency`, `SkuMeter`, and `SkuPriceDetails` columns to their legacy `x_` counterparts. ### [Optimization engine](optimization-engine/overview.md) v13 diff --git a/src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_v1_2.kql b/src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_v1_2.kql index ae5a5d95c..4f4d66711 100644 --- a/src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_v1_2.kql +++ b/src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_v1_2.kql @@ -748,7 +748,7 @@ Costs_transform_v1_2() ListCost, ListUnitPrice, PricingCategory, - PricingCurrency, + PricingCurrency = coalesce(PricingCurrency, x_PricingCurrency), PricingQuantity, PricingUnit, ProviderName, @@ -762,8 +762,8 @@ Costs_transform_v1_2() ServiceName, ServiceSubcategory, // TODO: Populate ServiceSubcategory from ServiceName when missing SkuId, - SkuMeter, - SkuPriceDetails, + SkuMeter = coalesce(SkuMeter, x_SkuMeterName), + SkuPriceDetails = coalesce(SkuPriceDetails, x_SkuDetails), SkuPriceId, SubAccountId, SubAccountName = iff(isempty(SubAccountId), '', SubAccountName),