【问题标题】:XMLA/TMSL from .Net Core来自 .Net Core 的 XMLA/TMSL
【发布时间】:2019-06-08 11:41:47
【问题描述】:
随着 Azure 世界的其他部分迁移到 .Net Core,Azure 分析服务似乎停留在 .Net 框架上。
有没有办法使用 .Net Core 上可用的框架对 SSAS 多维数据集执行 TMSL 或 XMLA?
这意味着 AMO 客户端和表格对象模型等被排除在外,因为这些程序集仅存在于 .Net Framework。
我正在尝试从 Azure Function V2 更新多维数据集数据源连接。
【问题讨论】:
标签:
azure
.net-core
azure-analysis-services
xmla
【解决方案2】:
这是一个执行 XMLA 的 .net 核心控制台示例,我相信它可以工作。
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();
}
}
}
一定要安装nuget包:(现在是预览版)
Microsoft.AnalysisServices.NetCore.retail.amd64
Microsoft.AnalysisServices.AdomdClient.NetCore.retail.amd64