From eb04b4dc9665e57cbb476c19fb0fea036fabbdae Mon Sep 17 00:00:00 2001 From: Andrea Muolo Date: Mon, 7 Nov 2022 08:37:03 +0100 Subject: [PATCH 1/2] implemented --- ...nsionsAndPartitions.csv => Dimensions.csv} | 9 --- .../InitSystemorphBaseToMemory.ipynb | 14 +--- .../InitSystemorphToDatabase.ipynb | 12 +--- .../Test/AocStructureTest.ipynb | 6 +- .../Test/ImportStorageTest.ipynb | 6 +- ifrs17/Constants/Validations.ipynb | 4 ++ ifrs17/Import/Importers.ipynb | 71 ++++++++++++------- 7 files changed, 60 insertions(+), 62 deletions(-) rename full-ifrs17-template/Files/{DimensionsAndPartitions.csv => Dimensions.csv} (96%) diff --git a/full-ifrs17-template/Files/DimensionsAndPartitions.csv b/full-ifrs17-template/Files/Dimensions.csv similarity index 96% rename from full-ifrs17-template/Files/DimensionsAndPartitions.csv rename to full-ifrs17-template/Files/Dimensions.csv index 4f648680..c6729913 100644 --- a/full-ifrs17-template/Files/DimensionsAndPartitions.csv +++ b/full-ifrs17-template/Files/Dimensions.csv @@ -220,15 +220,6 @@ BE,Best Estimate,,,,,,,,,, SystemName,DisplayName,,,,,,,,,, BBA,Building Block Approach,,,,,,,,,, ,,,,,,,,,,, -@@PartitionByReportingNode,,,,,,,,,,, -ReportingNode,Id,,,,,,,,,, -CH,00000000-0000-0000-0000-000000000001,,,,,,,,,, -,,,,,,,,,,, -@@PartitionByReportingNodeAndPeriod,,,,,,,,,,, -ReportingNode,Year,Month,Id,,,,,,,, -CH,2020,12,10000000-0000-0000-0000-000000000000,,,,,,,, -CH,2021,3,20000000-0000-0000-0000-000000000000,,,,,,,, -,,,,,,,,,,, @@ProjectionConfiguration,,,,,,,,,,, SystemName,DisplayName,Shift,TimeStep,,,,,,,, P0,End of January,0,1,,,,,,,, diff --git a/full-ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb b/full-ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb index e910c089..d0b7ff22 100644 --- a/full-ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb +++ b/full-ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb @@ -73,7 +73,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DimensionsAndPartitions.csv\")", + "await Import.FromFile(\"../Files/Dimensions.csv\")", "\n .WithType()", "\n .WithType()", "\n .WithType()", @@ -100,7 +100,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DimensionsAndPartitions.csv\").WithFormat(ImportFormats.AocConfiguration).WithTarget(DataSource).ExecuteAsync()" + "await Import.FromFile(\"../Files/Dimensions.csv\").WithFormat(ImportFormats.AocConfiguration).WithTarget(DataSource).ExecuteAsync()" ] }, { @@ -109,16 +109,6 @@ "await Import.FromFile(\"../Files/300.ReportingNodes/ReportingNodes.csv\").WithType().WithTarget(DataSource).ExecuteAsync()" ] }, - { - "cell_type": "code", - "source": [ - "await Import.FromFile(\"../Files/DimensionsAndPartitions.csv\")", - "\n .WithType()", - "\n .WithType()", - "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" - ] - }, { "cell_type": "markdown", "source": [ diff --git a/full-ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb b/full-ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb index cc45633d..6a1ef5a6 100644 --- a/full-ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb +++ b/full-ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb @@ -56,7 +56,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/DimensionsAndPartitions.csv\")", + "await Import.FromFile(\"../Files/Dimensions.csv\")", "\n .WithType()", "\n .WithType()", "\n .WithType()", @@ -87,16 +87,6 @@ "await Import.FromFile(\"../Files/300.ReportingNodes/ReportingNodes.csv\").WithType().WithTarget(DataSource).ExecuteAsync()" ] }, - { - "cell_type": "code", - "source": [ - "await Import.FromFile(\"../Files/DimensionsAndPartitions.csv\")", - "\n .WithType()", - "\n .WithType()", - "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" - ] - }, { "cell_type": "markdown", "source": [ diff --git a/full-ifrs17-template/Test/AocStructureTest.ipynb b/full-ifrs17-template/Test/AocStructureTest.ipynb index f279ad6f..1ab1b634 100644 --- a/full-ifrs17-template/Test/AocStructureTest.ipynb +++ b/full-ifrs17-template/Test/AocStructureTest.ipynb @@ -26,7 +26,7 @@ { "cell_type": "code", "source": [ - "#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\"" + "#!eval-notebook \"../Initialization/InitSystemorphToMemory\"" ] }, { @@ -38,7 +38,9 @@ { "cell_type": "code", "source": [ - "Workspace.InitializeFrom(DataSource);" + "Workspace.Initialize(x => x.FromSource(DataSource)", + "\n .DisableInitialization()", + "\n .DisableInitialization());" ] }, { diff --git a/full-ifrs17-template/Test/ImportStorageTest.ipynb b/full-ifrs17-template/Test/ImportStorageTest.ipynb index effe2de0..b535d3f4 100644 --- a/full-ifrs17-template/Test/ImportStorageTest.ipynb +++ b/full-ifrs17-template/Test/ImportStorageTest.ipynb @@ -26,7 +26,7 @@ { "cell_type": "code", "source": [ - "#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\"" + "#!eval-notebook \"../Initialization/InitSystemorphToMemory\"" ] }, { @@ -39,8 +39,8 @@ "cell_type": "code", "source": [ "Workspace.Initialize(x => x.FromSource(DataSource)", - "\n .DisableInitialization()", - "\n .DisableInitialization());" + "\n .DisableInitialization()", + "\n .DisableInitialization());" ] }, { diff --git a/ifrs17/Constants/Validations.ipynb b/ifrs17/Constants/Validations.ipynb index afd2e82e..6ed1a24b 100644 --- a/ifrs17/Constants/Validations.ipynb +++ b/ifrs17/Constants/Validations.ipynb @@ -54,6 +54,7 @@ "public enum Error { ", "\n // Import", "\n NoMainTab, IncompleteMainTab, ParsingScientificNotation, ValueTypeNotFound, ValueTypeNotValid, ", + "\n ReportingNodeInMainNotFound, YearInMainNotFound, MonthInMainNotFound,", "\n AocTypeNotValid, AocTypeCompulsoryNotFound, AocTypePositionNotSupported, AocConfigurationOrderNotUnique,", "\n // Partition", "\n PartitionNotFound, ParsedPartitionNotFound, PartititionNameNotFound, PartitionTypeNotFound,", @@ -95,6 +96,9 @@ "\n (Error.ParsingScientificNotation , 1) => $\"While parsing found real number in scientific notation: {s[0]}.\",", "\n (Error.ValueTypeNotFound , _) => $\"Value Type not found.\",", "\n (Error.ValueTypeNotValid , 1) => $\"The Value Type {s[0]} is invalid.\",", + "\n (Error.ReportingNodeInMainNotFound , _) => $\"Reporting Node missing from the Main tab.\",", + "\n (Error.YearInMainNotFound , _) => $\"Year missing from the Main tab.\",", + "\n (Error.MonthInMainNotFound , _) => $\"Month missing from the Main tab.\",", "\n (Error.AocTypeNotValid , 1) => $\"The parsed AocType {s[0]} is invalid.\",", "\n (Error.AocTypeCompulsoryNotFound , _) => $\"Not all compulsory AocTypes have been imported.\",", "\n (Error.AocTypePositionNotSupported , 1) => $\"The position of the AocType {s[0]} is not supported.\",", diff --git a/ifrs17/Import/Importers.ipynb b/ifrs17/Import/Importers.ipynb index 7aeb86d5..856eaacf 100644 --- a/ifrs17/Import/Importers.ipynb +++ b/ifrs17/Import/Importers.ipynb @@ -411,39 +411,60 @@ { "cell_type": "code", "source": [ - "public async Task GetArgsFromMainAsync(IDataSet dataSet)", + "public async Task GetArgsFromMainAsync(IDataSet dataSet)", "\n{", "\n var mainTab = dataSet.Tables[Main];", - "\n ", "\n if(mainTab == null) ApplicationMessage.Log(Error.NoMainTab);", "\n if(mainTab.Rows.Count() == 0) ApplicationMessage.Log(Error.IncompleteMainTab);", + "\n if(mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNode.ReportingNode)).Count()!=1) ApplicationMessage.Log(Error.ReportingNodeInMainNotFound);", "\n if(ApplicationMessage.HasErrors()) return null;", "\n ", "\n var main = mainTab.Rows.First();", - "\n var scenario = mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNode.Scenario)).Count() > 0? ", - "\n (string)main[nameof(PartitionByReportingNode.Scenario)] : default(string);", - "\n ", - "\n var partitionName = typeof(IPartition).Name switch ", - "\n {", - "\n nameof(PartitionByReportingNode) => new ImportArgs( (string)main[nameof(PartitionByReportingNode.ReportingNode)],", - "\n default(int),", - "\n default(int),", - "\n default(Periodicity),", - "\n scenario,", - "\n default(string)),", - "\n ", - "\n nameof(PartitionByReportingNodeAndPeriod) => new ImportArgs( (string)main[nameof(PartitionByReportingNodeAndPeriod.ReportingNode)], ", - "\n (int)Convert.ChangeType(main[nameof(PartitionByReportingNodeAndPeriod.Year)], typeof(int)),", - "\n (int)Convert.ChangeType(main[nameof(PartitionByReportingNodeAndPeriod.Month)], typeof(int)),", - "\n default(Periodicity),", - "\n scenario,", - "\n default(string)),", - "\n ", - "\n _ => null", - "\n };", + "\n var reportingNode = (string)main[nameof(PartitionByReportingNode.ReportingNode)];", + "\n var scenario = mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNode.Scenario)).Count()>0? ", + "\n (string)main[nameof(PartitionByReportingNode.Scenario)] : default(string);", + "\n", + "\n ImportArgs args;", + "\n switch(typeof(TPartition).Name) {", + "\n case nameof(PartitionByReportingNode) : {", + "\n args = new ImportArgs( reportingNode,", + "\n default(int),", + "\n default(int),", + "\n default(Periodicity),", + "\n scenario,", + "\n default(string));", + "\n await DataSource.UpdateAsync( new[] { new PartitionByReportingNode { ", + "\n Id = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync(args)),", + "\n ReportingNode = reportingNode, ", + "\n Scenario = scenario } } );", + "\n break;", + "\n }", + "\n case nameof(PartitionByReportingNodeAndPeriod) : {", + "\n if(mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNodeAndPeriod.Year)).Count()!=1) ApplicationMessage.Log(Error.YearInMainNotFound);", + "\n if(mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNodeAndPeriod.Month)).Count()!=1) ApplicationMessage.Log(Error.MonthInMainNotFound);", + "\n if(ApplicationMessage.HasErrors()) return null;", + "\n args = new ImportArgs( reportingNode, ", + "\n (int)Convert.ChangeType(main[nameof(PartitionByReportingNodeAndPeriod.Year)], typeof(int)),", + "\n (int)Convert.ChangeType(main[nameof(PartitionByReportingNodeAndPeriod.Month)], typeof(int)),", + "\n default(Periodicity),", + "\n scenario,", + "\n default(string) );", + "\n await DataSource.UpdateAsync( new[]{ new PartitionByReportingNodeAndPeriod { ", + "\n Id = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync(args)),", + "\n Year = args.Year,", + "\n Month = args.Month,", + "\n ReportingNode = reportingNode, ", + "\n Scenario = scenario } } );", + "\n break;", + "\n }", + "\n default : {", + "\n ApplicationMessage.Log(Error.PartitionTypeNotFound, typeof(IPartition).Name); ", + "\n return null;", + "\n }", + "\n }", "\n ", - "\n if (partitionName == null) ApplicationMessage.Log(Error.PartitionTypeNotFound, typeof(IPartition).Name); ", - "\n return partitionName;", + "\n await DataSource.CommitAsync();", + "\n return args;", "\n}" ] }, From fae9b83275691dbbdbfccdf87b21f0f9b2a2ea57 Mon Sep 17 00:00:00 2001 From: Andrea Muolo Date: Mon, 7 Nov 2022 11:02:04 +0100 Subject: [PATCH 2/2] implement feedback --- .../Test/AocStructureTest.ipynb | 23 +++++++++++---- .../Test/ImportStorageTest.ipynb | 28 ++++++++++++------- .../Test/MapTemplateAndImportTest.ipynb | 19 ++----------- ifrs17/Import/Importers.ipynb | 11 ++++---- 4 files changed, 43 insertions(+), 38 deletions(-) diff --git a/full-ifrs17-template/Test/AocStructureTest.ipynb b/full-ifrs17-template/Test/AocStructureTest.ipynb index 1ab1b634..7a350bb4 100644 --- a/full-ifrs17-template/Test/AocStructureTest.ipynb +++ b/full-ifrs17-template/Test/AocStructureTest.ipynb @@ -26,7 +26,7 @@ { "cell_type": "code", "source": [ - "#!eval-notebook \"../Initialization/InitSystemorphToMemory\"" + "#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\"" ] }, { @@ -52,10 +52,22 @@ { "cell_type": "code", "source": [ - "var args = new ImportArgs(\"CH\", 2021, 3, Periodicity.Quarterly, null, ImportFormats.Cashflow);", - "\nvar partition = Workspace.Query().FirstOrDefault(x => x.ReportingNode == args.ReportingNode && x.Year == args.Year && ", - "\n x.Month == args.Month && x.Scenario == args.Scenario);", - "\nif(partition == null) ApplicationMessage.Log(Error.PartitionNotFound);" + "var reportingNode = \"CH\";", + "\nvar scenario = (string)null;" + ] + }, + { + "cell_type": "code", + "source": [ + "//Define partition", + "\nvar args = new ImportArgs(reportingNode, 2021, 3, Periodicity.Quarterly, scenario, ImportFormats.Actual);", + "\nvar partition = new PartitionByReportingNodeAndPeriod { Id = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync(args)),", + "\n ReportingNode = reportingNode, ", + "\n Scenario = scenario, ", + "\n Year = args.Year,", + "\n Month = args.Month };", + "\nawait DataSource.UpdateAsync(new[]{partition});", + "\nawait DataSource.CommitAsync();" ] }, { @@ -298,7 +310,6 @@ "\n new AocStep(\"EA\",\"C\"), new AocStep(\"AM\",\"C\"), new AocStep(\"CL\",\"C\"),", "\n }},", "\n //{new AocStep(\"CF\",\"C\"), Enumerable.Empty()},", - "\n ", "\n };" ] }, diff --git a/full-ifrs17-template/Test/ImportStorageTest.ipynb b/full-ifrs17-template/Test/ImportStorageTest.ipynb index b535d3f4..bb0d0a2e 100644 --- a/full-ifrs17-template/Test/ImportStorageTest.ipynb +++ b/full-ifrs17-template/Test/ImportStorageTest.ipynb @@ -26,7 +26,7 @@ { "cell_type": "code", "source": [ - "#!eval-notebook \"../Initialization/InitSystemorphToMemory\"" + "#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\"" ] }, { @@ -53,21 +53,29 @@ "cell_type": "code", "source": [ "var gic = \"DT1.1\";", - "\nvar gric = \"DTR1.1\";" + "\nvar gric = \"DTR1.1\";", + "\nvar reportingNode = \"CH\";", + "\nvar scenario = (string)null;" ] }, { "cell_type": "code", "source": [ "//Define partition", - "\nvar args = new ImportArgs(\"CH\", 2021, 3, Periodicity.Quarterly, null, ImportFormats.Actual);", - "\nvar partition = DataSource.Query().FirstOrDefault(x => x.ReportingNode == args.ReportingNode && x.Year == args.Year && ", - "\n x.Month == args.Month && x.Scenario == args.Scenario);", - "\nif(partition == null) ApplicationMessage.Log(Error.PartitionNotFound);", - "\n", - "\nvar previousPeriodPartition = Workspace.Query().FirstOrDefault(x => x.ReportingNode == args.ReportingNode && x.Year == args.Year - 1 && ", - "\n x.Month == MonthInAYear && x.Scenario == args.Scenario);", - "\nif(previousPeriodPartition == null) ApplicationMessage.Log(Error.PartitionNotFound);" + "\nvar args = new ImportArgs(reportingNode, 2021, 3, Periodicity.Quarterly, scenario, ImportFormats.Actual);", + "\nvar previousArgs = new ImportArgs(reportingNode, 2020, 12, Periodicity.Quarterly, scenario, ImportFormats.Actual);", + "\nvar partition = new PartitionByReportingNodeAndPeriod { Id = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync(args)),", + "\n ReportingNode = reportingNode, ", + "\n Scenario = scenario, ", + "\n Year = args.Year,", + "\n Month = args.Month };", + "\nvar previousPeriodPartition = new PartitionByReportingNodeAndPeriod { Id = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync(previousArgs)),", + "\n ReportingNode = reportingNode, ", + "\n Scenario = scenario, ", + "\n Year = args.Year,", + "\n Month = args.Month };", + "\nawait DataSource.UpdateAsync(new[]{partition, previousPeriodPartition});", + "\nawait DataSource.CommitAsync();" ] }, { diff --git a/full-ifrs17-template/Test/MapTemplateAndImportTest.ipynb b/full-ifrs17-template/Test/MapTemplateAndImportTest.ipynb index 69f8137a..92b8091b 100644 --- a/full-ifrs17-template/Test/MapTemplateAndImportTest.ipynb +++ b/full-ifrs17-template/Test/MapTemplateAndImportTest.ipynb @@ -166,11 +166,7 @@ "\ngricCols.Intersect(tables.Tables[nameof(GroupOfReinsuranceContract)].Columns.Select(x => x.ColumnName).ToArray()).Count().Should().Be(gricCols.Length); ", "\n", "\n// check that imported data matches the exported data", - "\nvar args = await GetArgsFromMainAsync(filename+\".xlsx\");", - "\nvar storage = new ParsingStorage(args, DataSource, Workspace);", - "\nawait storage.InitializeAsync();", - "\n", - "\nawait UploadDataNodesToWorkspaceAsync(filename+\".xlsx\");", + "\nawait Import.FromFile(filename+\".xlsx\").WithFormat(ImportFormats.DataNode).WithTarget(Workspace).ExecuteAsync();", "\nUtils.EqualityComparer(ips, Workspace.Query().ToArray());", "\nUtils.EqualityComparer(rps, Workspace.Query().ToArray());", "\nUtils.EqualityComparer(gics, Workspace.Query().ToArray());", @@ -245,12 +241,7 @@ "\ndataNodeStateCols.Intersect(tables.Tables[\"DataNodeState\"].Columns.Select(x => x.ColumnName).ToArray()).Count().Should().Be(dataNodeStateCols.Length);", "\n", "\n// check that imported data matches the exported data ", - "\nvar args = await GetArgsFromMainAsync(filename+\".xlsx\");", - "\nvar storage = new ParsingStorage(args, DataSource, Workspace);", - "\nawait storage.InitializeAsync();", - "\n", - "\nawait UploadDataNodeStateToWorkspaceAsync(filename+\".xlsx\");", - "\n", + "\nawait Import.FromFile(filename+\".xlsx\").WithFormat(ImportFormats.DataNodeState).WithTarget(Workspace).ExecuteAsync();", "\n// Workspace is empty because ValidateDataNodeStatesAsync removes the entry, since this is already present in the DataSource.", "\nWorkspace.Query().ToArray().Should().BeEmpty();", "\n*/" @@ -330,11 +321,7 @@ "\nsingleDataNodeParamCols.Intersect(tables.Tables[nameof(SingleDataNodeParameter)].Columns.Select(x => x.ColumnName).ToArray()).Count().Should().Be(singleDataNodeParamCols.Length);", "\ninterDataNodeParamCols.Intersect(tables.Tables[nameof(InterDataNodeParameter)].Columns.Select(x => x.ColumnName).ToArray()).Count().Should().Be(interDataNodeParamCols.Length);", "\n// check that imported data matches the exported data ", - "\nvar args = await GetArgsFromMainAsync(filename+\".xlsx\");", - "\nvar storage = new ParsingStorage(args, DataSource, Workspace);", - "\nvar targetPartitionByReportingNodeId = new Guid();", - "\nawait storage.InitializeAsync();", - "\nawait UploadDataNodeParameterToWorkspaceAsync(filename+\".xlsx\", targetPartitionByReportingNodeId);", + "\nawait Import.FromFile(filename+\".xlsx\").WithFormat(ImportFormats.DataNodeParameter).WithTarget(Workspace).ExecuteAsync();", "\nvar expectedSingleDataNodeParamBm = Workspace.Query().Where(x => x.Year == partition.Year && x.Month == partition.Month).ToArray();", "\nvar expectedInterDataNodeParamBm = Workspace.Query().ToArray();", "\nUtils.EqualityComparer(singleDataNodeParamBm, expectedSingleDataNodeParamBm);", diff --git a/ifrs17/Import/Importers.ipynb b/ifrs17/Import/Importers.ipynb index 856eaacf..25ec1369 100644 --- a/ifrs17/Import/Importers.ipynb +++ b/ifrs17/Import/Importers.ipynb @@ -411,21 +411,20 @@ { "cell_type": "code", "source": [ - "public async Task GetArgsFromMainAsync(IDataSet dataSet)", + "public async Task GetArgsFromMainAsync(IDataSet dataSet)", "\n{", "\n var mainTab = dataSet.Tables[Main];", "\n if(mainTab == null) ApplicationMessage.Log(Error.NoMainTab);", "\n if(mainTab.Rows.Count() == 0) ApplicationMessage.Log(Error.IncompleteMainTab);", - "\n if(mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNode.ReportingNode)).Count()!=1) ApplicationMessage.Log(Error.ReportingNodeInMainNotFound);", + "\n if(mainTab.Columns.FirstOrDefault(x => x.ColumnName == nameof(ReportingNode)) == null) ApplicationMessage.Log(Error.ReportingNodeInMainNotFound);", "\n if(ApplicationMessage.HasErrors()) return null;", "\n ", "\n var main = mainTab.Rows.First();", - "\n var reportingNode = (string)main[nameof(PartitionByReportingNode.ReportingNode)];", - "\n var scenario = mainTab.Columns.Where(x => x.ColumnName == nameof(PartitionByReportingNode.Scenario)).Count()>0? ", - "\n (string)main[nameof(PartitionByReportingNode.Scenario)] : default(string);", + "\n var reportingNode = (string)main[nameof(ReportingNode)];", + "\n var scenario = mainTab.Columns.Where(x => x.ColumnName == nameof(Scenario)).Count()>0? (string)main[nameof(Scenario)] : default(string);", "\n", "\n ImportArgs args;", - "\n switch(typeof(TPartition).Name) {", + "\n switch(typeof(IPartition).Name) {", "\n case nameof(PartitionByReportingNode) : {", "\n args = new ImportArgs( reportingNode,", "\n default(int),",