I am trying to query my powerbi metadata stored in Azure Analysis services through python. I have used Nuget package and loaded the dll "Microsoft.AnalysisServices.AdomdClient" to my root folder (RHEL Linux), when I tried to execute the below program it throws an error (screenshot attached below)
from sys import path
path.append('/root/dll/Microsoft.AnalysisServices.AdomdClient')
from pyadomd import Pyadomd
conn='Provider=MSOLAP.7;Data Source=powerbi://api.powerbi.com/v1.0/myorg/;Initial Catalog=model;User Id=testuser;Password=;'
query = "SELECT DIMENSION_CAPTION AS [DIMENSION] FROM $system.MDSchema_Dimensions"
with Pyadomd(conn) as conn:
with conn.cursor().execute(query) as cur:
print(cur.fetchall())
Here is the screenshot of the error: