I am trying to connect to a MS Analysis Services OLAP cube via python as explained in [MS Analysis Services OLAP API for Python I used the following code:
import clr
from System.Reflection import Assembly
Assembly.LoadWithPartialName("AnalysisServices.dll")
from Microsoft.AnalysisServices import Server, ProcessType
amoServer = Server()
amoServer.Connect('server')
amoDb = amoServer.Databases['Database']
results = amoServer.Execute('MDX Query')
for result in results:
print result.Value
However, I got a void/empty result. I know that I am connected correctly to the server because I got the right names for databases, cubes and dimensions.
I also tested the same query in Microsoft SQL Server Management Studio and I got results.
Could you please help me to understand what am I doing wrong to get the empy result? Thank you in advance.