Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion full-ifrs17-template/Database/Configure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
{
"cell_type": "code",
"source": [
"#!import \"//ifrs17ce/dev/CalculationEngine\""
"#!import \"../Constants/Consts\"",
"\n#!eval calculationEngine"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,25 @@
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<YieldCurve>(\"../Files/800.Parameters/YieldCurve.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/YieldCurve.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<ExchangeRate>(\"../Files/800.Parameters/ExchangeRate.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/ExchangeRate.csv\").WithType<ExchangeRate>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<PartnerRating>(\"../Files/800.Parameters/PartnerRating.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/PartnerRating.csv\").WithType<PartnerRating>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<CreditDefaultRate>(\"../Files/800.Parameters/CreditDefaultRate.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/CreditDefaultRate.csv\").WithType<CreditDefaultRate>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand All @@ -158,19 +158,19 @@
{
"cell_type": "code",
"source": [
"await UploadDataNodesAsync(\"../Files/700.DataNodes/DataNodes_CH.csv\")"
"await Import.FromFile(\"../Files/700.DataNodes/DataNodes_CH.csv\").WithFormat(ImportFormats.DataNode).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDataNodeStateAsync(\"../Files/700.DataNodes/DataNodeStates_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/700.DataNodes/DataNodeStates_CH_2020_12.csv\").WithFormat(ImportFormats.DataNodeState).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDataNodeParameterAsync(\"../Files/700.DataNodes/DataNodeParameters_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/700.DataNodes/DataNodeParameters_CH_2020_12.csv\").WithFormat(ImportFormats.DataNodeParameter).WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand Down
24 changes: 12 additions & 12 deletions full-ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,25 @@
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<YieldCurve>(\"../Files/800.Parameters/YieldCurve.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/YieldCurve.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<ExchangeRate>(\"../Files/800.Parameters/ExchangeRate.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/ExchangeRate.csv\").WithType<ExchangeRate>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<PartnerRating>(\"../Files/800.Parameters/PartnerRating.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/PartnerRating.csv\").WithType<PartnerRating>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDimensionsAsync<CreditDefaultRate>(\"../Files/800.Parameters/CreditDefaultRate.csv\")"
"await Import.FromFile(\"../Files/800.Parameters/CreditDefaultRate.csv\").WithType<CreditDefaultRate>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand All @@ -136,19 +136,19 @@
{
"cell_type": "code",
"source": [
"await UploadDataNodesAsync(\"../Files/700.DataNodes/DataNodes_CH.csv\")"
"await Import.FromFile(\"../Files/700.DataNodes/DataNodes_CH.csv\").WithFormat(ImportFormats.DataNode).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDataNodeStateAsync(\"../Files/700.DataNodes/DataNodeStates_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/700.DataNodes/DataNodeStates_CH_2020_12.csv\").WithFormat(ImportFormats.DataNodeState).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadDataNodeParameterAsync(\"../Files/700.DataNodes/DataNodeParameters_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/700.DataNodes/DataNodeParameters_CH_2020_12.csv\").WithFormat(ImportFormats.DataNodeParameter).WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand All @@ -160,31 +160,31 @@
{
"cell_type": "code",
"source": [
"await UploadOpeningAsync(\"../Files/900.TransactionalData/Openings_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/Openings_CH_2020_12.csv\").WithFormat(ImportFormats.Opening).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadCashflowsAsync(\"../Files/900.TransactionalData/NominalCashflows_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/NominalCashflows_CH_2020_12.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadActualAsync(\"../Files/900.TransactionalData/Actuals_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/Actuals_CH_2020_12.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadCashflowsAsync(\"../Files/900.TransactionalData/NominalCashflows_CH_2021_3.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/NominalCashflows_CH_2021_3.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadActualAsync(\"../Files/900.TransactionalData/Actuals_CH_2021_3.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/Actuals_CH_2021_3.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions full-ifrs17-template/Initialization/InitSystemorphToMemory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,31 @@
{
"cell_type": "code",
"source": [
"await UploadOpeningAsync(\"../Files/900.TransactionalData/Openings_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/Openings_CH_2020_12.csv\").WithFormat(ImportFormats.Opening).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadCashflowsAsync(\"../Files/900.TransactionalData/NominalCashflows_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/NominalCashflows_CH_2020_12.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadActualAsync(\"../Files/900.TransactionalData/Actuals_CH_2020_12.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/Actuals_CH_2020_12.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadCashflowsAsync(\"../Files/900.TransactionalData/NominalCashflows_CH_2021_3.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/NominalCashflows_CH_2021_3.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "code",
"source": [
"await UploadActualAsync(\"../Files/900.TransactionalData/Actuals_CH_2021_3.csv\")"
"await Import.FromFile(\"../Files/900.TransactionalData/Actuals_CH_2021_3.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions full-ifrs17-template/Test/MapTemplateAndImportTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@
"source": [
"public async Task CheckErrors(string inputFileName, List<string> errorBms)",
"\n{",
"\n var partitionId = new Guid();",
"\n var log = await UploadDataNodeParameterToWorkspaceAsync(inputFileName, partitionId);",
"\n var log = await Import.FromFile(inputFileName).WithFormat(ImportFormats.DataNodeParameter).WithTarget(Workspace).ExecuteAsync();",
"\n Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());",
"\n errorBms.Intersect(log.Errors.Select(x => x.ToString().Substring(0,x.ToString().Length-2).Substring(40)).ToArray()).Count().Should().Be(errorBms.Count());",
"\n}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"cell_type": "code",
"source": [
"var groupOfContract = \"GricComplex\";",
"\nawait UploadCashflowsAsync(\"Data/CashflowComplex.csv\")"
"\nawait Import.FromFile(\"Data/CashflowComplex.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).ExecuteAsync()"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions ifrs17/Constants/Consts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@
"public static class ImportFormats{",
"\n public const string Cashflow = nameof(Cashflow);",
"\n public const string Actual = nameof(Actual);",
"\n public const string DataNode = nameof(DataNode);",
"\n public const string DataNodeParameter = nameof(DataNodeParameter);",
"\n public const string DataNodeState = nameof(DataNodeState);",
"\n public const string SimpleValue = nameof(SimpleValue);",
"\n public const string Opening = nameof(Opening);",
"\n public const string AocConfiguration = nameof(AocConfiguration);",
Expand Down
Loading