Search code examples
sql-serversql-server-data-toolsssas-tabular

Can Python script be used as data source in SSAS Project?


I can select Python script as a new data source in Power BI, but I haven't found similar option to import data for my Analysis Services Tabular Project in Visual Studio. Can anyone give me a hint?

Here's a little bit more detail about my question. When we want to import new data for analysis to Power BI Desktop we can select from many other sources 'Python script', input python code and get a required dataset as a table for creating model. Good idea, but it's not quite convenient to access this model from Excel. So I decided to deploy my model to SQL Server Analysis Services. Having started new SSAS Tabular Project in Visual Studio, I discovered that there is no such possibility to import data in my model using python script, as I am used to in Power BI Desktop. I'm not so proficient in VS and hoped there might be some "tricks" to solve the problem. That's what my question was about.

Thanks to David I see now that only possibility to execute python code on SQL Server is to embed it into SQL statement. I installed ML Services, wrote a couple of procedures and everything works fine now.


Solution

  • Analysis Services 2017 doesn't support Python data sources. You can use a SQL Server instance (possibly installed on the same server) to host the Python code with Machine Learning Services.