Reputation: 3678
As the rest of the Azure world migrates to .Net Core it seems Azure Analysis Services is stuck on the .Net Framework.
Is there a way to execute TMSL or XMLA against a SSAS Cube using frameworks available on .Net Core?
This means AMO clients and Tabular Object Model etc. are excluded as these assemblies only exists for .Net Framework.
I'm trying to update a cube data source connection from an Azure Function V2.
Upvotes: 3
Views: 658
Reputation: 78
This is a .net core console example executing XMLA, I am sure it works.
using Microsoft.AnalysisServices;
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Server OlapServer = new Server();
string connStrOlap = "Provider=MSOLAP.4; Data Source=http://localhost/olap/msmdpump.dll; Catalog=YourCatalog;";
OlapServer.Connect(connStrOlap);
string XMLACommand = @"
<Batch xmlns=""http://schemas.microsoft.com/analysisservices/2003/engine"">
<Parallel>
.......Your XML content.......
</Parallel>
</Batch>
";
var result = OlapServer.Execute(XMLACommand);
OlapServer.Disconnect();
OlapServer.Dispose();
Console.ReadKey();
}
}
}
be sure to install nuget package:(now they are preview version) Microsoft.AnalysisServices.NetCore.retail.amd64 Microsoft.AnalysisServices.AdomdClient.NetCore.retail.amd64
Upvotes: 0
Reputation: 157
I was looking for the same thing and came across this: https://github.com/RadarSoft/xmla-client
It has no dependencies on ADOMD.net (yay!). Unfortunately I am just now getting started with my own POC so I don't have hands-on experience with it yet. But it looks very promising!
Upvotes: 1