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}]");