From bab366ce91946a7425c8065075e4670779d31597 Mon Sep 17 00:00:00 2001 From: Jesper Justesen <1972142+FirestarJes@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:45:04 +0200 Subject: [PATCH] Update to actual names for jobs, and add new param for blancefixing --- .../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}]");