Issue with method that returns Analysis services model

Karol Kolodziejczyk 6 Reputation points
2020-11-10T09:49:43.36+00:00

Hello,
I have issues with extraction of model from Azure Analysis Services server using Powershell/C# methods and classes.
In some cases, for some databases/cubes (no differences in the configuration itself), it returns empty Model (like there would be no model), however the Model exists on the server in reality. Also, I noticed that without changes in the Analysis services database it returned different result after some time. Because of that I am not able to reliably extract any model parameters from Azure Analysis services.
Seems like instability and different result returned by the code below.
$server = New-Object Microsoft.AnalysisServices.Tabular.Server
$server.connect($connectionString)
$database = $server.Databases.FindByName($databaseName)
$database.Model

It returns empty result but the correct it should return class name for Model like below:
Model : Microsoft.AnalysisServices.Tabular.Model

Any ideas what can cause it? Is there any known issue with those methods?

Thanks

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
456 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.