using (Server server = new()) {
server.Connect(connectionString);
string newDatabaseName = "Tabular - [New Database]";
Database blankDatabase = new() {
Name = newDatabaseName,
ID = newDatabaseName,
CompatibilityLevel = 1500, //1130 and higher
StorageEngineUsed = StorageEngineUsed.TabularMetadata,
ModelType = ModelType.Tabular //Databases can have a ModelType of default. Default is equivalent to multidimensional, and thus does not support the use of reserved characters in column names.
};
server.Databases.Add(blankDatabase);
blankDatabase.Update(UpdateOptions.ExpandFull);
}
fail: Function.HandleProcessStreamCreateModelAsync[3] Executed 'ProcessStreamCreateModelJobHandler.HandleProcessStreamCreateModelAsync' (Failed, Id=b6f4580e-ea83-4b38-96e3-bc1514b6a3bf, Duration=27000ms) Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: ProcessStreamCreateModelJobHandler.HandleProcessStreamCreateModelAsync ---> System.InvalidOperationException: The 'Name' property cannot contain any of the following characters: . , ; ' ` : / \ * | ? " & % $ ! + = ( ) [ ] { } < > at Microsoft.AnalysisServices.NamedComponentCollection.ValidateForAddOrInsert(NamedComponent obj) at Microsoft.AnalysisServices.NamedComponentCollection.Add(ModelComponent item) at [...]