Tabular model & Python

Sometimes you need to retrieve data from SSAS service but you dont want to use application like Excel or Power BI. You can do it with Python.
We will connect to local SSAS instance.

Result:

You can also connect to Power BI Desktop Tabular Model.

You need to find port and database name and change it in CONNECTION_STRING variable.
CONNECTION_STRING = r”Provider=MSOLAP;Data Source=localhost:60184;Catalog=67a2ca6f-74ea-414a-9857–1766e347f616;”
You will get the same result as in the first case.