From efdc13e2ebd9ea7107b20d9ba44b49c92a7fbe5b Mon Sep 17 00:00:00 2001 From: Thomas Mahlberg <93132118+caol-ila@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:30:40 +0200 Subject: [PATCH 1/2] Update KustoDatabaseHandler.cs --- KustoSchemaTools/Parser/KustoDatabaseHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KustoSchemaTools/Parser/KustoDatabaseHandler.cs b/KustoSchemaTools/Parser/KustoDatabaseHandler.cs index ab127f4..ddb160c 100644 --- a/KustoSchemaTools/Parser/KustoDatabaseHandler.cs +++ b/KustoSchemaTools/Parser/KustoDatabaseHandler.cs @@ -31,7 +31,7 @@ public async Task LoadAsync() var database = new Database(); foreach (var plugin in Plugins) { - plugin.Load(database, DatabaseName, client); + await plugin.Load(database, DatabaseName, client); } return database; From 6d813096e4853ea341ed5295d0efbf1da57f58f1 Mon Sep 17 00:00:00 2001 From: Thomas Mahlberg <93132118+caol-ila@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:31:07 +0200 Subject: [PATCH 2/2] Update KustoMaterializedViewBulkLoader.cs --- .../Parser/KustoLoader/KustoMaterializedViewBulkLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KustoSchemaTools/Parser/KustoLoader/KustoMaterializedViewBulkLoader.cs b/KustoSchemaTools/Parser/KustoLoader/KustoMaterializedViewBulkLoader.cs index 0e0e327..d448352 100644 --- a/KustoSchemaTools/Parser/KustoLoader/KustoMaterializedViewBulkLoader.cs +++ b/KustoSchemaTools/Parser/KustoLoader/KustoMaterializedViewBulkLoader.cs @@ -5,7 +5,7 @@ namespace KustoSchemaTools.Parser.KustoLoader public class KustoMaterializedViewBulkLoader : KustoBulkEntityLoader { const string LoadMaterializedViews = ".show materialized-views details| project EntityName=MaterializedViewName, Body=bag_pack(\"DocString\", DocString, \"Folder\", Folder,\"RetentionAndCachePolicy\",bag_pack(\"Retention\",strcat(toint(totimespan(parse_json(RetentionPolicy).SoftDeletePeriod)/1d),\"d\") , \"HotCache\", strcat(toint(totimespan(parse_json(CachingPolicy).DataHotSpan)/1d),\"d\")))"; - const string LoadDetails = ".show materialized-views | extend Lookback = strcat(toint(Lookback / 1d),\"d\") | extend Lookback = iff(Lookback == 'd', \"\", Lookback) | project EnitityName=Name, Body=bag_pack_columns(Source= SourceTable,Query,IsEnabled, Folder,DocString, AutoUpdateSchema, Lookback)"; + const string LoadDetails = ".show materialized-views | extend Lookback = strcat(toint(Lookback / 1d),\"d\") | extend Lookback = iff(Lookback == 'd', \"\", Lookback) | project EntityName=Name, Body=bag_pack_columns(Source= SourceTable,Query,IsEnabled, Folder,DocString, AutoUpdateSchema, Lookback)"; public KustoMaterializedViewBulkLoader() : base(d => d.MaterializedViews) { }