I have Azure analysis service instance, with a tabular model, I need to query the data by DAX or MDX from a python script.
I got a connection string from Azure that look's like this:
Provider=MSOLAP;Data Source=asazure://eastus.asazure.windows.net/mymodel;Initial Catalog=mycatalog;User [email protected];Password=mypass;Persist Security Info=True;Impersonation Level=Impersonate
I tried to connect to that connection string with pyodbc
:
import pyodbc
connection_str = "Provider=MSOLAP;Data Source=asazure://eastus.asazure.windows.net/mymodel;" \
"Initial Catalog=mycatalog;User [email protected];Password=mypass;" \
"Persist Security Info=True;Impersonation Level=Impersonate"
my_connection = pyodbc.connect(connection_str)
I got this error:
Traceback (most recent call last):
File "C:/workspace/test.py", line 7, in <module>
my_connection = pyodbc.connect(connection_str)
pyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
Process finished with exit code 1
Could not find a version that satisfies the requirement pyoledb
– Ramses