0

Can any help me in fetching data from power BI endpoint without the need of using Power Shell, as want to know a way of directly fetching in Linux only?

I know a power shell can be installed in Linux , but is there any way I can skip and directly fetch the data?

reference - https://learn.microsoft.com/en-us/power-bi/admin/service-premium-connect-tools

2 Answers 2

1

Your Power BI XMLA endpoint is accessible through your Azure Analysis Services (AAS) instance tied to the given datasource/workspace, which means that you should be able to connect to that AAS instance and work with the data there via the web. I am not aware of any currently available Linux compatible tools that allow this. I did a bit of research and was surprised to find that there was not a VS Code extension that allowed this (might have to get to work on that ;)).

That being said, Microsoft has several different client libraries (for both AMO and ADOMD.NET) built within their .NET Core framework that would theoretically be able to used by a client application that could be built for supported Linux OS (Microsoft doc here). In other words, (again, theoretically) it should be relatively painless to build a simple tool for a supported Linux OS that takes in XMLA commands and executes them on a provided connection.

EDIT: Another good option to consider might be Microsoft's Power BI REST API (documentation here). If the functionality you are looking for is available within their REST API, you should be able to write a client tool (using one of many different options, but .NET Core could still be the in there) targeting Linux that makes use of the API for your Power BI instance in place of directly using the XMLA endpoint. I would consider this the better alternative. This is going is a less 'Microsoft-y' way of doing this, and is going to be much easier to maintain and develop over time. I would start by confirming that the functionality you want is not available in this API first.

EDIT: After reading further in above linked document regarding AMO and ADOMD.NET client libraries:

TCP based connectivity is supported for Windows computers only.

Interactive login with Azure Active Directory is supported for Windows computers only. The .NET Core Desktop runtime is required.

So it looks like there are currently some limitations to these libraries regarding a Linux runtime. I am not positive that you could use something other than TCP based connectivity to accomplish this, but if I find a way (or someone is able to suggest something), then I will update.

Sign up to request clarification or add additional context in comments.

Comments

1

My journey started after reading this topic. And I started to gather all the breadcrumbs and clues I have found around the Internet.

First of all. There is a difference between Mono and dotnet(aka .net core), as pointed by Darren Gosbell on a microsoft learn page [4]. As everyone stumbling upon this issue I tried using Mono and specific to Windows version of Adomd whic is located in this link [5]. It didn't work as there were API used specific to Windows. It was failing. Then I learned that there is actualy a 'native' dotnet app that could run those DLLs. I started by loading that native to Windows AdomdClient DLL version using Mono - Fail. Then using dotnet - Fail. And right after that I understood that a .net core DLL has to be used. So I found one on Nuget [3]. And boom, right after that the original problem has gone, but I had a malformed connection string, which I believe was leading to lib to try to run a interactive login(just imo) and then failing into an issue where it said that a function or a dependency is only supported on Windows platform or something like that. So make sure you add a valid url to the powerbi(in my case), username and password.

I am using Python3.9 with pyadomd==0.1.1 So, you download .net core version of AdomdClient DLL, Microsoft.Identity.Client, Microsoft.IdentityModel.Abstractions as listed below. Put them in the same folder and add the absolute path to that folder into sys.path so that it could retrieve it. And there you are. Link to github gist which works for me [0]

[0] https://gist.github.com/nenkoru/ab4544664755c89eb833456fe9557635

[1] https://www.nuget.org/packages/Microsoft.AnalysisServices.AdomdClient.NetCore.retail.amd64 lib/netcoreapp3.0/Microsoft.AnalysisServices.AdomdClient.dll

[2] https://www.nuget.org/packages/Microsoft.Identity.Client/ lib/netcoreapp2.1/Microsoft.Identity.Client.dll

[3] https://www.nuget.org/packages/Microsoft.IdentityModel.Abstractions lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll

[4] https://learn.microsoft.com/en-us/answers/questions/233745/can-adomd-net-core-connect-to-an-ssas-endpoint-fro?page=2#answers [5] https://www.nuget.org/packages/Microsoft.AnalysisServices.AdomdClient.retail.amd64/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.