From 6af28e4981e306d7e5b5803a450eede5ff17b2ae Mon Sep 17 00:00:00 2001 From: akatz Date: Mon, 16 Jan 2023 09:24:27 +0100 Subject: [PATCH 01/13] render the Source Id nullable and make sure that no fake id is recorded for failed imports --- ifrs17/Utils/ActivityLog.ipynb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ifrs17/Utils/ActivityLog.ipynb b/ifrs17/Utils/ActivityLog.ipynb index 2ce8b659..0acfdfd1 100644 --- a/ifrs17/Utils/ActivityLog.ipynb +++ b/ifrs17/Utils/ActivityLog.ipynb @@ -72,7 +72,7 @@ "\n [Conversion(typeof(JsonConverter))]", "\n public string[] InfoMessages {get; init;}", "\n", - "\n public Guid SourceId {get; init;} ", + "\n public Guid? SourceId {get; init;} ", "\n ", "\n public ImportExportActivity(ActivityLog log, ISessionVariable session)", "\n {", @@ -373,13 +373,14 @@ "\n try", "\n {", "\n importFile = await (new ImportFile(fio, importVariable, session)).InitializeImportDataAsync() as ImportFile;", + "\n activity = activity with {SourceId = importFile.Id};", "\n }", "\n catch (Exception)", "\n {", "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", "\n }", - "\n activity = activity with {SourceId = importFile.Id, ", - "\n Category = \"Import from File\"};", + "\n activity = activity with {Category = \"Import from File\"};", "\n if (importSucceeded) await dataSource.UpdateAsync(importFile.RepeatOnce());", "\n break;", "\n case StringImportOptions sgio:", @@ -387,13 +388,14 @@ "\n try", "\n { ", "\n importString = await (new ImportString(sgio, importVariable, session)).InitializeImportDataAsync() as ImportString;", + "\n activity = activity with {SourceId = importString.Id};", "\n }", "\n catch (Exception)", "\n {", "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", "\n }", - "\n activity = activity with {SourceId = importString.Id, ", - "\n Category = \"Import from String\"};", + "\n activity = activity with {Category = \"Import from String\"};", "\n if (importSucceeded) await dataSource.UpdateAsync(importString.RepeatOnce());", "\n break;", "\n case StreamImportOptions smio:", @@ -401,13 +403,14 @@ "\n try", "\n {", "\n importStream = await (new ImportStream(smio, importVariable, session)).InitializeImportDataAsync() as ImportStream;", + "\n activity = activity with {SourceId = importStream.Id};", "\n }", "\n catch (Exception)", "\n {", "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", "\n }", - "\n activity = activity with {SourceId = importStream.Id, ", - "\n Category = \"Import from Stream\"};", + "\n activity = activity with {Category = \"Import from Stream\"};", "\n if (importSucceeded) await dataSource.UpdateAsync(importStream.RepeatOnce());", "\n break;", "\n case DataSetImportOptions dsio:", @@ -415,13 +418,14 @@ "\n try", "\n {", "\n importDataSet = await (new ImportDataSet(dsio, importVariable, session)).InitializeImportDataAsync() as ImportDataSet;", + "\n activity = activity with {SourceId = importDataSet.Id};", "\n }", "\n catch(Exception)", "\n {", "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", "\n }", - "\n activity = activity with {SourceId = importDataSet.Id, ", - "\n Category = \"Import from Data Set\"};", + "\n activity = activity with {Category = \"Import from Data Set\"};", "\n if (importSucceeded) await dataSource.UpdateAsync(importDataSet.RepeatOnce());", "\n break;", "\n default:", From d4b313710af6236708c0090cae4551fc5351c25c Mon Sep 17 00:00:00 2001 From: akatz Date: Mon, 16 Jan 2023 11:34:57 +0100 Subject: [PATCH 02/13] new api --- ifrs17/Utils/ActivityLog.ipynb | 154 +++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/ifrs17/Utils/ActivityLog.ipynb b/ifrs17/Utils/ActivityLog.ipynb index 0acfdfd1..8cdee286 100644 --- a/ifrs17/Utils/ActivityLog.ipynb +++ b/ifrs17/Utils/ActivityLog.ipynb @@ -354,6 +354,160 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "public record ImportBuilderWriter(ImportOptionsBuilder Builder, ", + "\n ISessionVariable Session, ", + "\n IDataSource DataSource, ", + "\n IDataSetImportVariable ImportVariable)", + "\n{", + "\n public async Task ExecuteAsync()", + "\n {", + "\n var log = await Builder.ExecuteAsync();", + "\n var options = Builder.GetImportOptions();", + "\n var activity = new ImportExportActivity(log, Session);", + "\n bool importSucceeded = true;", + "\n switch(options)", + "\n {", + "\n case FileImportOptions fio:", + "\n var importFile = new ImportFile(Guid.NewGuid());", + "\n try", + "\n {", + "\n importFile = await (new ImportFile(fio, ImportVariable, Session)).InitializeImportDataAsync() as ImportFile;", + "\n activity = activity with {SourceId = importFile.Id};", + "\n }", + "\n catch (Exception)", + "\n {", + "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", + "\n }", + "\n activity = activity with {Category = \"Import from File\"};", + "\n if (importSucceeded) await DataSource.UpdateAsync(importFile.RepeatOnce());", + "\n break;", + "\n", + "\n case StringImportOptions sgio:", + "\n var importString = new ImportString(Guid.NewGuid());", + "\n try", + "\n {", + "\n importString = await (new ImportString(sgio, ImportVariable, Session)).InitializeImportDataAsync() as ImportString;", + "\n activity = activity with {SourceId = importString.Id};", + "\n }", + "\n catch (Exception)", + "\n {", + "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", + "\n }", + "\n activity = activity with {Category = \"Import from String\"};", + "\n if (importSucceeded) await DataSource.UpdateAsync(importString.RepeatOnce());", + "\n break;", + "\n ", + "\n case StreamImportOptions smio:", + "\n var importStream = new ImportStream(Guid.NewGuid());", + "\n try", + "\n {", + "\n importStream = await (new ImportStream(smio, ImportVariable, Session)).InitializeImportDataAsync() as ImportStream;", + "\n activity = activity with {SourceId = importStream.Id};", + "\n }", + "\n catch (Exception)", + "\n {", + "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", + "\n }", + "\n activity = activity with {Category = \"Import from Stream\"};", + "\n if (importSucceeded) await DataSource.UpdateAsync(importStream.RepeatOnce());", + "\n break;", + "\n", + "\n case DataSetImportOptions dsio:", + "\n var importDataSet = new ImportDataSet(Guid.NewGuid());", + "\n try", + "\n {", + "\n importDataSet = await (new ImportDataSet(dsio, ImportVariable, Session)).InitializeImportDataAsync() as ImportDataSet;", + "\n activity = activity with {SourceId = importDataSet.Id};", + "\n }", + "\n catch (Exception)", + "\n {", + "\n importSucceeded = false;", + "\n activity = activity with {SourceId = null};", + "\n }", + "\n activity = activity with {Category = \"Import from Data Set\"};", + "\n if (importSucceeded) await DataSource.UpdateAsync(importDataSet.RepeatOnce());", + "\n break;", + "\n", + "\n default:", + "\n throw new Exception(\"Import Options object is not an instance of an appropriate class.\");", + "\n break;", + "\n }", + "\n await DataSource.UpdateAsync(activity.RepeatOnce());", + "\n await DataSource.CommitAsync();", + "\n return log;", + "\n }", + "\n}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public record ExportBuilderWriter(DocumentBuilder Builder, ", + "\n ISessionVariable Session, ", + "\n IDataSource DataSource, ", + "\n IDataSetImportVariable ImportVariable)", + "\n{", + "\n public async Task ExecuteAsync()", + "\n {", + "\n var exportResult = await Builder.ExecuteAsync();", + "\n var exportFile = await (new ExportFile(Builder, ImportVariable, Session)).InitializeExportDataAsync();", + "\n var activity = new ImportExportActivity(exportResult.ActivityLog, Session) with {Category = \"Export to File\", ", + "\n SourceId = exportFile.Id};", + "\n await DataSource.UpdateAsync(exportFile.RepeatOnce());", + "\n await DataSource.UpdateAsync(activity.RepeatOnce());", + "\n await DataSource.CommitAsync();", + "\n return exportResult;", + "\n }", + "\n}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public static ImportBuilderWriter WithLogsRecordedInDb(this ImportOptionsBuilder builder, ", + "\n ISessionVariable session, ", + "\n IDataSource dataSource, ", + "\n IDataSetImportVariable importVariable) => ", + "\n new ImportBuilderWriter(builder, session, dataSource, importVariable);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "public static ExportBuilderWriter WithLogsRecordedInDb(this IDocumentBuilder builder, ", + "\n ISessionVariable session, ", + "\n IDataSource dataSource, ", + "\n IDataSetImportVariable importVariable) =>", + "\n new ExportBuilderWriter(builder as DocumentBuilder, session, dataSource, importVariable);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "The routines from here on are for the old API. They must be rendered obsolete after we verify that the new API is working properly. " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ From bb88f366f7024e72c1ced93346b1f341b20737b3 Mon Sep 17 00:00:00 2001 From: akatz Date: Tue, 17 Jan 2023 17:55:21 +0100 Subject: [PATCH 03/13] new API finished --- PresentValueSeries/InitializeData.ipynb | 6 +-- .../PresentValue - Episode 2.ipynb | 4 +- .../PresentValue - Episode 3.ipynb | 14 +++--- ifrs17-template/Export/MapTemplate.ipynb | 6 +-- .../Import/CloseImportTemplate.ipynb | 4 +- .../InitSystemorphBaseToMemory.ipynb | 6 +-- .../InitSystemorphRefDataToMemory.ipynb | 26 +++++------ .../InitSystemorphToDatabase.ipynb | 44 +++++++++---------- .../InitSystemorphToMemory.ipynb | 14 +++--- .../ActualsUseCaseDataImport.ipynb | 18 ++++---- .../CsmSwitchDataImport.ipynb | 18 ++++---- 11 files changed, 80 insertions(+), 80 deletions(-) diff --git a/PresentValueSeries/InitializeData.ipynb b/PresentValueSeries/InitializeData.ipynb index aacb77e0..52c82f85 100644 --- a/PresentValueSeries/InitializeData.ipynb +++ b/PresentValueSeries/InitializeData.ipynb @@ -58,7 +58,7 @@ "\n .WithType() .WithType() .WithType() ", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -70,7 +70,7 @@ "await Import.FromFile(\"Dimensions.xlsx\")", "\n .WithFormat(ImportFormats.AocConfiguration)", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -82,7 +82,7 @@ "await Import.FromFile(\"DataNodes.xlsx\")", "\n .WithFormat(\"DataNode\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/PresentValueSeries/PresentValue - Episode 2.ipynb b/PresentValueSeries/PresentValue - Episode 2.ipynb index 9164e6e5..012a4e79 100644 --- a/PresentValueSeries/PresentValue - Episode 2.ipynb +++ b/PresentValueSeries/PresentValue - Episode 2.ipynb @@ -171,7 +171,7 @@ "await Import.FromFile(\"YieldCurve.xlsx\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -183,7 +183,7 @@ "await Import.FromFile(\"Cashflows.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/PresentValueSeries/PresentValue - Episode 3.ipynb b/PresentValueSeries/PresentValue - Episode 3.ipynb index 16605c69..c2ab3cb9 100644 --- a/PresentValueSeries/PresentValue - Episode 3.ipynb +++ b/PresentValueSeries/PresentValue - Episode 3.ipynb @@ -171,7 +171,7 @@ "await Import.FromFile(\"DataNodes_CH.xlsx\")", "\n .WithFormat(\"DataNode\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -183,7 +183,7 @@ "await Import.FromFile(\"DataNodes_DE.xlsx\")", "\n .WithFormat(\"DataNode\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -195,7 +195,7 @@ "await Import.FromFile(\"YieldCurve.xlsx\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -207,7 +207,7 @@ "await Import.FromFile(\"Cashflows.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -219,7 +219,7 @@ "await Import.FromFile(\"CF_CH_2021_12.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -231,7 +231,7 @@ "await Import.FromFile(\"CF_DE_2021_12.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -243,7 +243,7 @@ "await Import.FromFile(\"CF_DE_2022_12.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .ExecuteAsync()" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index a56e1ffe..bbda514a 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -155,7 +155,7 @@ "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfigurationWoScenario(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -240,7 +240,7 @@ "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", "\n .MainTabConfigurationWoScenario(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -326,7 +326,7 @@ "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Import/CloseImportTemplate.ipynb b/ifrs17-template/Import/CloseImportTemplate.ipynb index aa95ca1d..51dedf85 100644 --- a/ifrs17-template/Import/CloseImportTemplate.ipynb +++ b/ifrs17-template/Import/CloseImportTemplate.ipynb @@ -121,7 +121,7 @@ "await Import.FromFile(pathToFile)", "\n .WithFormat(format)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -169,7 +169,7 @@ "await Import.FromFile(pathToFile)", "\n .WithFormat(format)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb index 84f27378..12b7e6bf 100644 --- a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb @@ -80,7 +80,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -92,7 +92,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -104,7 +104,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index b0fb3cba..ad018c94 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -118,7 +118,7 @@ "\n .WithType()", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +130,7 @@ "await Import.FromFile(\"../Files/Dimensions.csv\")", "\n .WithFormat(ImportFormats.AocConfiguration)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +142,7 @@ "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -163,36 +163,36 @@ "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader);", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync();", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader));", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync());", "\nlog" ], "metadata": {}, @@ -205,7 +205,7 @@ "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -217,7 +217,7 @@ "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -229,7 +229,7 @@ "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb index 9d7288c4..9d7f3dab 100644 --- a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb @@ -96,7 +96,7 @@ "\n .WithType()", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -108,7 +108,7 @@ "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -129,36 +129,36 @@ "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader);", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync();", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)", + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog" ], @@ -172,7 +172,7 @@ "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -184,7 +184,7 @@ "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -196,7 +196,7 @@ "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -217,7 +217,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -229,7 +229,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -241,7 +241,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -262,7 +262,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -274,7 +274,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -286,7 +286,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -298,7 +298,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -310,7 +310,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -322,7 +322,7 @@ "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -334,7 +334,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb index d82e0186..f9aa620c 100644 --- a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb @@ -70,7 +70,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -82,7 +82,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -94,7 +94,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -106,7 +106,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -118,7 +118,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +130,7 @@ "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +142,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb b/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb index 5db058d3..a5877864 100644 --- a/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb @@ -77,7 +77,7 @@ "await Import.FromFile(\"DataNodes_ActualsCase_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -89,7 +89,7 @@ "await Import.FromFile(\"DataNodeStates_ActualsCase_CH_2020_1.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -101,7 +101,7 @@ "await Import.FromFile(\"DataNodeParameters_ActualsCase_CH_2020_1.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -131,7 +131,7 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -143,7 +143,7 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -164,7 +164,7 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2021_6.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -176,7 +176,7 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2021_6.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -197,7 +197,7 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2021_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -209,7 +209,7 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2021_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb index a8493d9b..425c3ecc 100644 --- a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb @@ -76,7 +76,7 @@ "await Import.FromFile(\"DataNodes_CsmSwitch_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -88,7 +88,7 @@ "await Import.FromFile(\"DataNodeStates_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -100,7 +100,7 @@ "await Import.FromFile(\"DataNodeParameters_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +130,7 @@ "await Import.FromFile(\"NominalCashflows_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +142,7 @@ "await Import.FromFile(\"Actuals_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -154,7 +154,7 @@ "await Import.FromFile(\"NominalCashflows_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -166,7 +166,7 @@ "await Import.FromFile(\"Actuals_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -187,7 +187,7 @@ "await Import.FromFile(\"SimpleValue_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -199,7 +199,7 @@ "await Import.FromFile(\"SimpleValue_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.SimpleValue)", "\n .WithTarget(DataSource)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, From 15fd489b088d6897ecaf984acc26d15ead72de11 Mon Sep 17 00:00:00 2001 From: akatz Date: Wed, 18 Jan 2023 17:53:46 +0100 Subject: [PATCH 04/13] agreed api --- ifrs17/Utils/ActivityLog.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ifrs17/Utils/ActivityLog.ipynb b/ifrs17/Utils/ActivityLog.ipynb index 8cdee286..23b425ae 100644 --- a/ifrs17/Utils/ActivityLog.ipynb +++ b/ifrs17/Utils/ActivityLog.ipynb @@ -476,7 +476,7 @@ { "cell_type": "code", "source": [ - "public static ImportBuilderWriter WithLogsRecordedInDb(this ImportOptionsBuilder builder, ", + "public static ImportBuilderWriter WithActivityLog(this ImportOptionsBuilder builder, ", "\n ISessionVariable session, ", "\n IDataSource dataSource, ", "\n IDataSetImportVariable importVariable) => ", @@ -489,11 +489,11 @@ { "cell_type": "code", "source": [ - "public static ExportBuilderWriter WithLogsRecordedInDb(this IDocumentBuilder builder, ", - "\n ISessionVariable session, ", - "\n IDataSource dataSource, ", - "\n IDataSetImportVariable importVariable) =>", - "\n new ExportBuilderWriter(builder as DocumentBuilder, session, dataSource, importVariable);" + "public static ExportBuilderWriter WithActivityLog(this IDocumentBuilder builder, ", + "\n ISessionVariable session, ", + "\n IDataSource dataSource, ", + "\n IDataSetImportVariable importVariable) =>", + "\n new ExportBuilderWriter(builder as DocumentBuilder, session, dataSource, importVariable);" ], "metadata": {}, "execution_count": 0, From 8a01ee15bf9a07bb7e78fc3077acb7478d9576d2 Mon Sep 17 00:00:00 2001 From: Andrey Katz <118806207+andrey-katz-systemorph@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:08:15 +0100 Subject: [PATCH 05/13] Update InitializeData.ipynb revert all changes --- PresentValueSeries/InitializeData.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PresentValueSeries/InitializeData.ipynb b/PresentValueSeries/InitializeData.ipynb index 52c82f85..f7baba98 100644 --- a/PresentValueSeries/InitializeData.ipynb +++ b/PresentValueSeries/InitializeData.ipynb @@ -58,7 +58,7 @@ "\n .WithType() .WithType() .WithType() ", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -70,7 +70,7 @@ "await Import.FromFile(\"Dimensions.xlsx\")", "\n .WithFormat(ImportFormats.AocConfiguration)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -82,7 +82,7 @@ "await Import.FromFile(\"DataNodes.xlsx\")", "\n .WithFormat(\"DataNode\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -108,4 +108,4 @@ "outputs": [] } ] -} \ No newline at end of file +} From ab7762bb77bfcb52a4e3159b93ff79799d096ba9 Mon Sep 17 00:00:00 2001 From: Andrey Katz <118806207+andrey-katz-systemorph@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:09:59 +0100 Subject: [PATCH 06/13] Update PresentValue - Episode 2.ipynb revert: no changes in PV --- PresentValueSeries/PresentValue - Episode 2.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PresentValueSeries/PresentValue - Episode 2.ipynb b/PresentValueSeries/PresentValue - Episode 2.ipynb index 012a4e79..37e9ce42 100644 --- a/PresentValueSeries/PresentValue - Episode 2.ipynb +++ b/PresentValueSeries/PresentValue - Episode 2.ipynb @@ -171,7 +171,7 @@ "await Import.FromFile(\"YieldCurve.xlsx\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -183,7 +183,7 @@ "await Import.FromFile(\"Cashflows.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -507,4 +507,4 @@ "outputs": [] } ] -} \ No newline at end of file +} From ff0c909af106bdbb5de71b00501c1392f9d2ae35 Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Thu, 19 Jan 2023 14:57:26 +0100 Subject: [PATCH 07/13] reset pv ep3 --- PresentValueSeries/PresentValue - Episode 3.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PresentValueSeries/PresentValue - Episode 3.ipynb b/PresentValueSeries/PresentValue - Episode 3.ipynb index c2ab3cb9..16605c69 100644 --- a/PresentValueSeries/PresentValue - Episode 3.ipynb +++ b/PresentValueSeries/PresentValue - Episode 3.ipynb @@ -171,7 +171,7 @@ "await Import.FromFile(\"DataNodes_CH.xlsx\")", "\n .WithFormat(\"DataNode\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -183,7 +183,7 @@ "await Import.FromFile(\"DataNodes_DE.xlsx\")", "\n .WithFormat(\"DataNode\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -195,7 +195,7 @@ "await Import.FromFile(\"YieldCurve.xlsx\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -207,7 +207,7 @@ "await Import.FromFile(\"Cashflows.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -219,7 +219,7 @@ "await Import.FromFile(\"CF_CH_2021_12.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -231,7 +231,7 @@ "await Import.FromFile(\"CF_DE_2021_12.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -243,7 +243,7 @@ "await Import.FromFile(\"CF_DE_2022_12.xlsx\")", "\n .WithFormat(\"Cashflow\")", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, From 1cf1c596163ad535b805e397d0464600802df84d Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Thu, 19 Jan 2023 15:06:17 +0100 Subject: [PATCH 08/13] rename WithActivityLog in template --- ifrs17-template/Export/MapTemplate.ipynb | 6 +-- .../Import/CloseImportTemplate.ipynb | 4 +- .../InitSystemorphBaseToMemory.ipynb | 6 +-- .../InitSystemorphRefDataToMemory.ipynb | 26 +++++------ .../InitSystemorphToDatabase.ipynb | 44 +++++++++---------- .../InitSystemorphToMemory.ipynb | 14 +++--- .../ActualsUseCaseDataImport.ipynb | 18 ++++---- .../CsmSwitchDataImport.ipynb | 18 ++++---- 8 files changed, 68 insertions(+), 68 deletions(-) diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index 968876f5..7b6419ac 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -155,7 +155,7 @@ "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfiguration(partition)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -240,7 +240,7 @@ "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", "\n .MainTabConfiguration(partition)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -326,7 +326,7 @@ "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Import/CloseImportTemplate.ipynb b/ifrs17-template/Import/CloseImportTemplate.ipynb index 51dedf85..e22f6cee 100644 --- a/ifrs17-template/Import/CloseImportTemplate.ipynb +++ b/ifrs17-template/Import/CloseImportTemplate.ipynb @@ -121,7 +121,7 @@ "await Import.FromFile(pathToFile)", "\n .WithFormat(format)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -169,7 +169,7 @@ "await Import.FromFile(pathToFile)", "\n .WithFormat(format)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb index 12b7e6bf..685a3fb7 100644 --- a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb @@ -80,7 +80,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -92,7 +92,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -104,7 +104,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index ad018c94..4b712f77 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -118,7 +118,7 @@ "\n .WithType()", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +130,7 @@ "await Import.FromFile(\"../Files/Dimensions.csv\")", "\n .WithFormat(ImportFormats.AocConfiguration)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +142,7 @@ "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -163,36 +163,36 @@ "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync();", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync();", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync());", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync());", "\nlog" ], "metadata": {}, @@ -205,7 +205,7 @@ "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -217,7 +217,7 @@ "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -229,7 +229,7 @@ "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb index 9d7f3dab..0563647b 100644 --- a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb @@ -96,7 +96,7 @@ "\n .WithType()", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -108,7 +108,7 @@ "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -129,36 +129,36 @@ "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync();", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync();", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", "\n );", "\nlog" ], @@ -172,7 +172,7 @@ "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -184,7 +184,7 @@ "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -196,7 +196,7 @@ "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -217,7 +217,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -229,7 +229,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -241,7 +241,7 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -262,7 +262,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -274,7 +274,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -286,7 +286,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -298,7 +298,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -310,7 +310,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -322,7 +322,7 @@ "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -334,7 +334,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb index f9aa620c..49c81e39 100644 --- a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb @@ -70,7 +70,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -82,7 +82,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -94,7 +94,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -106,7 +106,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -118,7 +118,7 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +130,7 @@ "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +142,7 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb b/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb index a5877864..c82a11b5 100644 --- a/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb @@ -77,7 +77,7 @@ "await Import.FromFile(\"DataNodes_ActualsCase_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -89,7 +89,7 @@ "await Import.FromFile(\"DataNodeStates_ActualsCase_CH_2020_1.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -101,7 +101,7 @@ "await Import.FromFile(\"DataNodeParameters_ActualsCase_CH_2020_1.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -131,7 +131,7 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -143,7 +143,7 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -164,7 +164,7 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2021_6.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -176,7 +176,7 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2021_6.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -197,7 +197,7 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2021_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -209,7 +209,7 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2021_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb index 425c3ecc..06097125 100644 --- a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb @@ -76,7 +76,7 @@ "await Import.FromFile(\"DataNodes_CsmSwitch_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -88,7 +88,7 @@ "await Import.FromFile(\"DataNodeStates_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -100,7 +100,7 @@ "await Import.FromFile(\"DataNodeParameters_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +130,7 @@ "await Import.FromFile(\"NominalCashflows_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +142,7 @@ "await Import.FromFile(\"Actuals_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -154,7 +154,7 @@ "await Import.FromFile(\"NominalCashflows_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -166,7 +166,7 @@ "await Import.FromFile(\"Actuals_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -187,7 +187,7 @@ "await Import.FromFile(\"SimpleValue_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -199,7 +199,7 @@ "await Import.FromFile(\"SimpleValue_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.SimpleValue)", "\n .WithTarget(DataSource)", - "\n .WithLogsRecordedInDb(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" ], "metadata": {}, "execution_count": 0, From a7e53c363129ac4df0548d53c38635eb5b3066d7 Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Thu, 19 Jan 2023 16:00:47 +0100 Subject: [PATCH 09/13] markdown, record exception, clean up --- ifrs17/Utils/ActivityLog.ipynb | 192 ++++++++++++--------------------- 1 file changed, 66 insertions(+), 126 deletions(-) diff --git a/ifrs17/Utils/ActivityLog.ipynb b/ifrs17/Utils/ActivityLog.ipynb index 23b425ae..e0e951ca 100644 --- a/ifrs17/Utils/ActivityLog.ipynb +++ b/ifrs17/Utils/ActivityLog.ipynb @@ -15,6 +15,24 @@ "nbformat": 4, "nbformat_minor": 5, "cells": [ + { + "cell_type": "markdown", + "source": [ + "

Activity Log

" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Import" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -48,6 +66,25 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "# Data Model" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Import Export Activity ", + "\nEvery activity to and from (import or export) the DataSource is tracked by recording an ImportExportActivity. Among other information this record tracks the user who performe the action, the timestamp, the activity log, and a unique identifier which can be used to retrieve the data subject of the activity. " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -63,6 +100,8 @@ "\n", "\n public string Category {get; init;}", "\n", + "\n public string ExceptionMessage {get; init;}", + "\n", "\n [Conversion(typeof(JsonConverter))]", "\n public string[] ErrorMessages {get; init;}", "\n", @@ -97,6 +136,16 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Keyed Import Export", + "\nContains the information of the file that has been the object of the activity. Among other information, it contains the content of the file in a serialized format. " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -354,6 +403,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "# Helper methods " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -377,10 +435,10 @@ "\n importFile = await (new ImportFile(fio, ImportVariable, Session)).InitializeImportDataAsync() as ImportFile;", "\n activity = activity with {SourceId = importFile.Id};", "\n }", - "\n catch (Exception)", + "\n catch (Exception e)", "\n {", "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", + "\n activity = activity with {SourceId = null, ExceptionMessage = e.Message};", "\n }", "\n activity = activity with {Category = \"Import from File\"};", "\n if (importSucceeded) await DataSource.UpdateAsync(importFile.RepeatOnce());", @@ -393,10 +451,10 @@ "\n importString = await (new ImportString(sgio, ImportVariable, Session)).InitializeImportDataAsync() as ImportString;", "\n activity = activity with {SourceId = importString.Id};", "\n }", - "\n catch (Exception)", + "\n catch (Exception e)", "\n {", "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", + "\n activity = activity with {SourceId = null, ExceptionMessage = e.Message};", "\n }", "\n activity = activity with {Category = \"Import from String\"};", "\n if (importSucceeded) await DataSource.UpdateAsync(importString.RepeatOnce());", @@ -409,10 +467,10 @@ "\n importStream = await (new ImportStream(smio, ImportVariable, Session)).InitializeImportDataAsync() as ImportStream;", "\n activity = activity with {SourceId = importStream.Id};", "\n }", - "\n catch (Exception)", + "\n catch (Exception e)", "\n {", "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", + "\n activity = activity with {SourceId = null, ExceptionMessage = e.Message};", "\n }", "\n activity = activity with {Category = \"Import from Stream\"};", "\n if (importSucceeded) await DataSource.UpdateAsync(importStream.RepeatOnce());", @@ -425,10 +483,10 @@ "\n importDataSet = await (new ImportDataSet(dsio, ImportVariable, Session)).InitializeImportDataAsync() as ImportDataSet;", "\n activity = activity with {SourceId = importDataSet.Id};", "\n }", - "\n catch (Exception)", + "\n catch (Exception e)", "\n {", "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", + "\n activity = activity with {SourceId = null, ExceptionMessage = e.Message};", "\n }", "\n activity = activity with {Category = \"Import from Data Set\"};", "\n if (importSucceeded) await DataSource.UpdateAsync(importDataSet.RepeatOnce());", @@ -499,124 +557,6 @@ "execution_count": 0, "outputs": [] }, - { - "cell_type": "markdown", - "source": [ - "The routines from here on are for the old API. They must be rendered obsolete after we verify that the new API is working properly. " - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "public static async Task ExecuteWithStoreActivityAsync(this ImportOptionsBuilder builder, ", - "\n ISessionVariable session, ", - "\n IDataSource dataSource, ", - "\n IDataSetImportVariable importVariable)", - "\n{", - "\n var log = await builder.ExecuteAsync();", - "\n var options = builder.GetImportOptions();", - "\n var activity = new ImportExportActivity(log, session);", - "\n bool importSucceeded = true;", - "\n switch(options)", - "\n {", - "\n case FileImportOptions fio:", - "\n var importFile = new ImportFile(Guid.NewGuid());", - "\n try", - "\n {", - "\n importFile = await (new ImportFile(fio, importVariable, session)).InitializeImportDataAsync() as ImportFile;", - "\n activity = activity with {SourceId = importFile.Id};", - "\n }", - "\n catch (Exception)", - "\n {", - "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", - "\n }", - "\n activity = activity with {Category = \"Import from File\"};", - "\n if (importSucceeded) await dataSource.UpdateAsync(importFile.RepeatOnce());", - "\n break;", - "\n case StringImportOptions sgio:", - "\n var importString = new ImportString(Guid.NewGuid());", - "\n try", - "\n { ", - "\n importString = await (new ImportString(sgio, importVariable, session)).InitializeImportDataAsync() as ImportString;", - "\n activity = activity with {SourceId = importString.Id};", - "\n }", - "\n catch (Exception)", - "\n {", - "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", - "\n }", - "\n activity = activity with {Category = \"Import from String\"};", - "\n if (importSucceeded) await dataSource.UpdateAsync(importString.RepeatOnce());", - "\n break;", - "\n case StreamImportOptions smio:", - "\n var importStream = new ImportStream(Guid.NewGuid());", - "\n try", - "\n {", - "\n importStream = await (new ImportStream(smio, importVariable, session)).InitializeImportDataAsync() as ImportStream;", - "\n activity = activity with {SourceId = importStream.Id};", - "\n }", - "\n catch (Exception)", - "\n {", - "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", - "\n }", - "\n activity = activity with {Category = \"Import from Stream\"};", - "\n if (importSucceeded) await dataSource.UpdateAsync(importStream.RepeatOnce());", - "\n break;", - "\n case DataSetImportOptions dsio:", - "\n var importDataSet = new ImportDataSet(Guid.NewGuid());", - "\n try", - "\n {", - "\n importDataSet = await (new ImportDataSet(dsio, importVariable, session)).InitializeImportDataAsync() as ImportDataSet;", - "\n activity = activity with {SourceId = importDataSet.Id};", - "\n }", - "\n catch(Exception)", - "\n {", - "\n importSucceeded = false;", - "\n activity = activity with {SourceId = null};", - "\n }", - "\n activity = activity with {Category = \"Import from Data Set\"};", - "\n if (importSucceeded) await dataSource.UpdateAsync(importDataSet.RepeatOnce());", - "\n break;", - "\n default:", - "\n throw new Exception(\"Import Options object is not an instance of an appropriate class.\");", - "\n break;", - "\n } ", - "\n await dataSource.UpdateAsync(activity.RepeatOnce());", - "\n await dataSource.CommitAsync(); ", - "\n return log;", - "\n}" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "public static async Task ExecuteWithStoreActivityAsync(this IDocumentBuilder builder, ", - "\n ISessionVariable session, ", - "\n IDataSource dataSource, ", - "\n IDataSetImportVariable importVariable)", - "\n{", - "\n var exportResult = await builder.ExecuteAsync();", - "\n var exportFile = await (new ExportFile(builder as DocumentBuilder, importVariable, session)).InitializeExportDataAsync();", - "\n var activity = new ImportExportActivity(exportResult.ActivityLog, session) with {Category = \"Export to File\", ", - "\n SourceId = exportFile.Id};", - "\n await dataSource.UpdateAsync(exportFile.RepeatOnce());", - "\n await dataSource.UpdateAsync(activity.RepeatOnce());", - "\n await dataSource.CommitAsync();", - "\n return exportResult;", - "\n}" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, { "cell_type": "code", "source": [ From a8585c7b4298c63a256eb8b4cad95988775a7159 Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Thu, 19 Jan 2023 17:08:46 +0100 Subject: [PATCH 10/13] adapt tests to new api --- ifrs17-template/Export/MapTemplate.ipynb | 9 +++-- .../Test/MapTemplateAndImportTest.ipynb | 18 ++++++---- ifrs17-template/Test/SequenceImportTest.ipynb | 33 ++++++++++++++++--- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/ifrs17-template/Export/MapTemplate.ipynb b/ifrs17-template/Export/MapTemplate.ipynb index 7b6419ac..dc792dba 100644 --- a/ifrs17-template/Export/MapTemplate.ipynb +++ b/ifrs17-template/Export/MapTemplate.ipynb @@ -155,7 +155,8 @@ "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfiguration(partition)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -240,7 +241,8 @@ "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", "\n .MainTabConfiguration(partition)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -326,7 +328,8 @@ "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Test/MapTemplateAndImportTest.ipynb b/ifrs17-template/Test/MapTemplateAndImportTest.ipynb index 6adc4569..39134932 100644 --- a/ifrs17-template/Test/MapTemplateAndImportTest.ipynb +++ b/ifrs17-template/Test/MapTemplateAndImportTest.ipynb @@ -166,7 +166,8 @@ "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader);", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync();", "\n", "\nexportResult.ActivityLog.Status.Should().Be(ActivityLogStatus.Succeeded);" ], @@ -184,7 +185,8 @@ "\n .GroupofContractConfiguration(typeof(ReinsurancePortfolio))", "\n .GroupofContractConfiguration(typeof(InsurancePortfolio))", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -265,7 +267,8 @@ "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader);", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync();", "\n", "\nexportResult.ActivityLog.Status.Should().Be(ActivityLogStatus.Succeeded);" ], @@ -281,7 +284,8 @@ "\n .StateEnumConfiguration() ", "\n .DataNodeStateConfiguration(dataNodeStates)", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -357,7 +361,8 @@ "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader);", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync();", "\n", "\nexportResult.ActivityLog.Status.Should().Be(ActivityLogStatus.Succeeded);" ], @@ -372,7 +377,8 @@ "\n .WithSource(Workspace)", "\n .DataNodeParameterConfiguration(dataNodeParameters)", "\n .MainTabConfiguration(partition)", - "\n .ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Test/SequenceImportTest.ipynb b/ifrs17-template/Test/SequenceImportTest.ipynb index e5014953..fec21ac1 100644 --- a/ifrs17-template/Test/SequenceImportTest.ipynb +++ b/ifrs17-template/Test/SequenceImportTest.ipynb @@ -55,7 +55,11 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(ws1).ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Cashflow)", + "\n .WithTarget(ws1)", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -64,7 +68,11 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\").WithFormat(ImportFormats.Actual).WithTarget(ws1).ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Actual)", + "\n .WithTarget(ws1)", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -99,6 +107,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -112,7 +129,11 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\").WithFormat(ImportFormats.Actual).WithTarget(ws2).ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Actual)", + "\n .WithTarget(ws2)", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -121,7 +142,11 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(ws2).ExecuteWithStoreActivityAsync(Session, DataSource, DataSetReader)" + "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Cashflow)", + "\n .WithTarget(ws2)", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, From 4a8495aa83806de79d4b1fc6121bf1873b37aeaf Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Thu, 19 Jan 2023 17:29:26 +0100 Subject: [PATCH 11/13] executeAsync to new line --- .../Import/CloseImportTemplate.ipynb | 6 +- .../InitSystemorphBaseToMemory.ipynb | 9 ++- .../InitSystemorphRefDataToMemory.ipynb | 39 +++++++---- .../InitSystemorphToDatabase.ipynb | 66 ++++++++++++------- .../InitSystemorphToMemory.ipynb | 21 ++++-- .../ActualsUseCaseDataImport.ipynb | 27 +++++--- .../CsmSwitchDataImport.ipynb | 27 +++++--- 7 files changed, 130 insertions(+), 65 deletions(-) diff --git a/ifrs17-template/Import/CloseImportTemplate.ipynb b/ifrs17-template/Import/CloseImportTemplate.ipynb index e22f6cee..fc78fc44 100644 --- a/ifrs17-template/Import/CloseImportTemplate.ipynb +++ b/ifrs17-template/Import/CloseImportTemplate.ipynb @@ -121,7 +121,8 @@ "await Import.FromFile(pathToFile)", "\n .WithFormat(format)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -169,7 +170,8 @@ "await Import.FromFile(pathToFile)", "\n .WithFormat(format)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb index 685a3fb7..412f644a 100644 --- a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb @@ -80,7 +80,8 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -92,7 +93,8 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -104,7 +106,8 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index 4b712f77..e6879913 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -118,7 +118,8 @@ "\n .WithType()", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +131,8 @@ "await Import.FromFile(\"../Files/Dimensions.csv\")", "\n .WithFormat(ImportFormats.AocConfiguration)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +144,8 @@ "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -163,36 +166,43 @@ "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync();", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync());", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync();", "\nlog" ], "metadata": {}, @@ -205,7 +215,8 @@ "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -217,7 +228,8 @@ "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -229,7 +241,8 @@ "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb index 0563647b..ecb29f00 100644 --- a/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb @@ -96,7 +96,8 @@ "\n .WithType()", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -108,7 +109,8 @@ "await Import.FromFile(\"../Files/ReportingNodes/ReportingNodes.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -129,36 +131,43 @@ "var log = await Import.FromFile(\"../Files/Parameters/YieldCurve_2019_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync();", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync();", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_6.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_12.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()", "\n );", "\nlog" ], @@ -172,7 +181,8 @@ "await Import.FromFile(\"../Files/Parameters/ExchangeRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -184,7 +194,8 @@ "await Import.FromFile(\"../Files/Parameters/PartnerRating.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -196,7 +207,8 @@ "await Import.FromFile(\"../Files/Parameters/CreditDefaultRate.csv\")", "\n .WithType()", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -217,7 +229,8 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodes_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -229,7 +242,8 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -241,7 +255,8 @@ "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -262,7 +277,8 @@ "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -274,7 +290,8 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -286,7 +303,8 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -298,7 +316,8 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -310,7 +329,8 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -322,7 +342,8 @@ "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -334,7 +355,8 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb index 49c81e39..f5a7d4bc 100644 --- a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb @@ -70,7 +70,8 @@ "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -82,7 +83,8 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -94,7 +96,8 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -106,7 +109,8 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -118,7 +122,8 @@ "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +135,8 @@ "await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue )", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +148,8 @@ "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb b/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb index c82a11b5..f3066174 100644 --- a/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/ActualsOutsideThePeriod/ActualsUseCaseDataImport.ipynb @@ -77,7 +77,8 @@ "await Import.FromFile(\"DataNodes_ActualsCase_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -89,7 +90,8 @@ "await Import.FromFile(\"DataNodeStates_ActualsCase_CH_2020_1.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -101,7 +103,8 @@ "await Import.FromFile(\"DataNodeParameters_ActualsCase_CH_2020_1.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -131,7 +134,8 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -143,7 +147,8 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -164,7 +169,8 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2021_6.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -176,7 +182,8 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2021_6.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -197,7 +204,8 @@ "await Import.FromFile(\"NominalCashflows_ActualsCase_CH_2021_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -209,7 +217,8 @@ "await Import.FromFile(\"Actuals_ActualsCase_CH_2021_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb index 06097125..a0d0556a 100644 --- a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb @@ -76,7 +76,8 @@ "await Import.FromFile(\"DataNodes_CsmSwitch_CH.csv\")", "\n .WithFormat(ImportFormats.DataNode)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -88,7 +89,8 @@ "await Import.FromFile(\"DataNodeStates_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeState)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -100,7 +102,8 @@ "await Import.FromFile(\"DataNodeParameters_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.DataNodeParameter)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -130,7 +133,8 @@ "await Import.FromFile(\"NominalCashflows_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -142,7 +146,8 @@ "await Import.FromFile(\"Actuals_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -154,7 +159,8 @@ "await Import.FromFile(\"NominalCashflows_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -166,7 +172,8 @@ "await Import.FromFile(\"Actuals_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -187,7 +194,8 @@ "await Import.FromFile(\"SimpleValue_CsmSwitch_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.SimpleValue)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, @@ -199,7 +207,8 @@ "await Import.FromFile(\"SimpleValue_CsmSwitch_CH_2021_3.csv\")", "\n .WithFormat(ImportFormats.SimpleValue)", "\n .WithTarget(DataSource)", - "\n .WithActivityLog(Session, DataSource, DataSetReader).ExecuteAsync()" + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, From feee4003f232faaaefe2d5b21a55c93aaae2bf63 Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Fri, 20 Jan 2023 10:29:12 +0100 Subject: [PATCH 12/13] fix semicolons --- .../Initialization/InitSystemorphRefDataToMemory.ipynb | 4 ++-- .../Test/Data/InitSystemorphToMemoryForTesting.ipynb | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb index e6879913..d406a80d 100644 --- a/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphRefDataToMemory.ipynb @@ -167,7 +167,7 @@ "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog(Session, DataSource, DataSetReader)", - "\n .ExecuteAsync()", + "\n .ExecuteAsync();", "\nlog.Merge(await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\")", "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", @@ -202,7 +202,7 @@ "\n .WithFormat(ImportFormats.YieldCurve)", "\n .WithTarget(DataSource)", "\n .WithActivityLog(Session, DataSource, DataSetReader)", - "\n .ExecuteAsync();", + "\n .ExecuteAsync());", "\nlog" ], "metadata": {}, diff --git a/ifrs17-template/Test/Data/InitSystemorphToMemoryForTesting.ipynb b/ifrs17-template/Test/Data/InitSystemorphToMemoryForTesting.ipynb index 6aac2878..36b1ed2a 100644 --- a/ifrs17-template/Test/Data/InitSystemorphToMemoryForTesting.ipynb +++ b/ifrs17-template/Test/Data/InitSystemorphToMemoryForTesting.ipynb @@ -27,7 +27,11 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"Actuals_CH_2020_12_MTUP10pct.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()" + "await Import.FromFile(\"Actuals_CH_2020_12_MTUP10pct.csv\")", + "\n .WithFormat(ImportFormats.Actual)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog(Session, DataSource, DataSetReader)", + "\n .ExecuteAsync()" ], "metadata": {}, "execution_count": 0, From 5ed1b02dba48504670da2efa58de6e7f1ec9c4d0 Mon Sep 17 00:00:00 2001 From: Davide Colleoni Date: Fri, 20 Jan 2023 11:30:40 +0100 Subject: [PATCH 13/13] update packages --- ifrs17/DataModel/DataStructure.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ifrs17/DataModel/DataStructure.ipynb b/ifrs17/DataModel/DataStructure.ipynb index d3e0e1e0..988bc676 100644 --- a/ifrs17/DataModel/DataStructure.ipynb +++ b/ifrs17/DataModel/DataStructure.ipynb @@ -54,7 +54,7 @@ "source": [ "#r \"nuget:Systemorph.Activities,1.6.2\"", "\n#r \"nuget:Systemorph.Arithmetics,1.6.2\"", - "\n#r \"nuget:Systemorph.Workspace,1.6.1\"", + "\n#r \"nuget:Systemorph.Workspace,1.6.3\"", "\n#r \"nuget:Systemorph.InteractiveObjects,1.6.2\"", "\n#r \"nuget:Systemorph.SharePoint,1.6.2\"", "\n#r \"nuget:Systemorph.OneDrive,1.6.2\"", @@ -63,11 +63,11 @@ "\n#r \"nuget:Systemorph.Test,1.6.2\"", "\n#r \"nuget:Systemorph.Export,1.6.4\"", "\n#r \"nuget:Systemorph.DataSetReader,1.6.4\"", - "\n#r \"nuget:Systemorph.DataSource,1.6.0\"", - "\n#r \"nuget:Systemorph.DataSource.Conversions,1.6.0\"", + "\n#r \"nuget:Systemorph.DataSource,1.6.3\"", + "\n#r \"nuget:Systemorph.DataSource.Conversions,1.6.3\"", "\n#r \"nuget:Systemorph.Reporting,1.6.2\"", "\n#r \"nuget:Systemorph.Charting,1.6.2\"", - "\n#r \"nuget:Systemorph.SchemaMigrations,1.6.1\"" + "\n#r \"nuget:Systemorph.SchemaMigrations,1.6.3\"" ], "metadata": {}, "execution_count": 0,