Forum Discussion
Don-Bot
1 year agoHelper V
Create semantic model with ADO Command, unable to find model afterwards
I'm using the below code in C# .net with an ADO Connection to create a Semantic Model in the power bi service. This code runs perfectly. However, afterwards even though I can see the model in the ...
- Anonymous1 year ago
Hi, Don-Bot
Regarding your question, you can try the following code:
using (Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server()) { server.Connect(connectionString); Microsoft.AnalysisServices.Database database = server.Databases.GetByName("adventureworks"); Microsoft.AnalysisServices.Tabular.Model model = database.Model as Microsoft.AnalysisServices.Tabular.Model; }Here's a screenshot of the response:
Here are the relevant links, I hope you find it helpful:
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
1 year agoNot applicable
Hi, Don-Bot
Regarding your question, you can try the following code:
using (Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server())
{
server.Connect(connectionString);
Microsoft.AnalysisServices.Database database = server.Databases.GetByName("adventureworks");
Microsoft.AnalysisServices.Tabular.Model model = database.Model as Microsoft.AnalysisServices.Tabular.Model;
}
Here's a screenshot of the response:
Here are the relevant links, I hope you find it helpful:
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.