Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi,
I have a table in power bi that is imported into power bi, then I run a python script on this that performs sentiment analysis and adds a row to the table saying if the comment is positive, negative, or neutral.
To get this to work I have python installed on my local machine and all the relevant libraries for python that allow this to work.
When I go to publish this report to the service and set an automated refresh will it know how to execute the python script when it refreshes? I am just wondering how it can execute this in the service, does it see which libraries are dependencies for the script then install them on the service (along with installing python itself?) somehow?
Or am I completely not understanding how python scripts are executed on the service.
Thanks
Hi. I'm not sure if there are deep specifications about this, but let me share my thoughts on this. The main reason why python scripts must have an on premise data gateway installed with Personal Mode is the answer. You must set up the environment on the VM that contains the gateway. Installing python and the libraries there will help the engine run the PowerQuery M script containing Python (unless you have built the pbi desktop reports on the same machine of the gateway, then you already have everything) when the refresh is triggered at Service.
I hope that make sense
Happy to help!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 10 | |
| 10 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 28 | |
| 20 |