From dcbee326ea02a9954db32db86aaa68e0b587acb0 Mon Sep 17 00:00:00 2001 From: Jesper Justesen <1972142+FirestarJes@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:22:24 +0200 Subject: [PATCH] Update to actual names for jobs, and add new param for blancefixing (#50) --- .../Handlers/DatabricksJobNames.cs | 5 ++--- .../Helpers/DatabricksJobsHelper.cs | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/settlement-report/SettlementReports.Application/Handlers/DatabricksJobNames.cs b/source/settlement-report/SettlementReports.Application/Handlers/DatabricksJobNames.cs index 6443885..1807046 100644 --- a/source/settlement-report/SettlementReports.Application/Handlers/DatabricksJobNames.cs +++ b/source/settlement-report/SettlementReports.Application/Handlers/DatabricksJobNames.cs @@ -16,7 +16,6 @@ namespace Energinet.DataHub.SettlementReport.Application.Handlers; public static class DatabricksJobNames { - // TODO: This is a placeholder for the actual job names - public const string BalanceFixing = "SettlementReportJob"; // "SettlementReportJob-balance-fixing"; - public const string Wholesale = "SettlementReportJob"; // "SettlementReportJob-wholesale"; + public const string BalanceFixing = "SettlementReportBalanceFixing"; + public const string Wholesale = "SettlementReportWholesaleCalculations"; } diff --git a/source/settlement-report/SettlementReports.Infrastructure/Helpers/DatabricksJobsHelper.cs b/source/settlement-report/SettlementReports.Infrastructure/Helpers/DatabricksJobsHelper.cs index ed32904..a83eb88 100644 --- a/source/settlement-report/SettlementReports.Infrastructure/Helpers/DatabricksJobsHelper.cs +++ b/source/settlement-report/SettlementReports.Infrastructure/Helpers/DatabricksJobsHelper.cs @@ -80,12 +80,16 @@ private RunParameters CreateParameters(SettlementReportRequestDto request, Marke { $"--report-id={reportId.Id}", $"--calculation-type={CalculationTypeMapper.ToDeltaTableValue(request.Filter.CalculationType)}", - $"--calculation-id-by-grid-area={gridAreas}", $"--period-start={request.Filter.PeriodStart.ToInstant()}", $"--period-end={request.Filter.PeriodEnd.ToInstant()}", $"--requesting-actor-market-role={MapMarketRole(request.MarketRoleOverride ?? marketRole)}", $"--requesting-actor-id={request.ActorNumberOverride ?? actorGln}", }; + + jobParameters.Add(request.Filter.CalculationType == CalculationType.BalanceFixing + ? $"--grid_area_codes={gridAreas}" + : $"--calculation-id-by-grid-area=[{string.Join(",", request.Filter.GridAreas.Select(x => x.Key))}]"); + if (request.Filter.EnergySupplier != null) { jobParameters.Add($"--energy-supplier-ids=[{request.Filter.EnergySupplier}]");