Search code examples
pythonssasolap

Python Connect to Microsoft Analysis Service


I want to connect to the Microsoft Analysis Server via Python. I have seen you can do this by the package XML or olapy, but both of them required the Analysis Server to be in HTTP, which is not applicable in my case. Is it possible to connect to Analysis Server using a connection string, that is similar to Microsoft's OLAP in R?

i.e. the connection will be something like:

connection_string = "Provider=MSOLAP.8;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog="Database Name";Data Source="Server Name";MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error;Update Isolation Level=2"

After connecting to the Analysis Server via this connection string, I expect to query the Server by some MDX/DAX code.

Thanks in advance!


Solution

  • Well just Googling around it seems that the library IronPython will be useful

    Execute query on SQL Server Analysis Services with IronPython