You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result.AddRange(GenerateScriptCompareChanges(oldState,newState, db =>db.Tables,nameof(newState.Tables),log,(oldItem,newItem)=>oldItem!=null||newItem.Columns?.Any()==true));
50
-
result.AddRange(GenerateScriptCompareChanges(oldState,newState, db =>db.MaterializedViews,nameof(newState.MaterializedViews),log));
51
+
varmvChanges=GenerateScriptCompareChanges(oldState,newState, db =>db.MaterializedViews,nameof(newState.MaterializedViews),log);
mvChange.Comment=newComment{FailsRollout=false,Kind=CommentKind.Note,Text=$"The materialized view {mvChange.Entity} is created with backfill configured. All required data is available in hot cache and the rollout is expected to succeed as long as it is rolled out before {validUntil:yyyy-MM-dd HH:mm}UTC. The rollout is executed asynchronusly, depending on the size of the backfill it might take a while."};
mvChange.Comment=newComment{FailsRollout=true,Kind=CommentKind.Caution,Text=$"Not all data for the backfill of {mvChange.Entity} is available hot. The backfill will fail! Please set the effective Date of the MV to {validUntil:yyyy-MM-dd} or newer."};
79
+
}
80
+
}
81
+
else
82
+
{
83
+
mvChange.Comment=newComment{FailsRollout=false,Kind=CommentKind.Warning,Text=$"The conditions for backfilling {mvChange.Entity} couldn't be validated. Please check for errors!"};
84
+
}
85
+
}
86
+
87
+
result.AddRange(mvChanges);
51
88
result.AddRange(GenerateScriptCompareChanges(oldState,newState, db =>db.ContinuousExports,nameof(newState.ContinuousExports),log));
52
89
result.AddRange(GenerateScriptCompareChanges(oldState,newState, db =>db.Functions,nameof(newState.Functions),log));
53
90
result.AddRange(GenerateScriptCompareChanges(oldState,newState, db =>db.ExternalTables,nameof(newState.ExternalTables),log));
Copy file name to clipboardExpand all lines: KustoSchemaTools/Model/MaterializedView.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -47,11 +47,11 @@ public List<DatabaseScriptContainer> CreateScripts(string name, bool isNew)
47
47
48
48
if(asyncSetup)
49
49
{
50
-
scripts.Add(newDatabaseScriptContainer("CreateMaterializedView",Kind=="table"?40:41,$".create async ifnotexists materialized-view with ({properties}) {name} on {Kind}{Source} {{ {Query} }}",true));
50
+
scripts.Add(newDatabaseScriptContainer("CreateMaterializedViewAsync",Kind=="table"?40:41,$".create async ifnotexists materialized-view with ({properties}) {name} on {Kind}{Source} {{ {Query} }}",true));
51
51
}
52
52
else
53
53
{
54
-
scripts.Add(newDatabaseScriptContainer("CreateMaterializedView",Kind=="table"?40:41,$".create-or-alter materialized-view with ({properties}) {name} on {Kind}{Source} {{ {Query} }}"));
54
+
scripts.Add(newDatabaseScriptContainer("CreateAlterMaterializedView",Kind=="table"?40:41,$".create-or-alter materialized-view with ({properties}) {name} on {Kind}{Source} {{ {Query} }}"));
0 commit comments