Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
thomas9921
Frequent Visitor

Is it possible to run python script in a dataflow?

When I try to transfer a query that uses a Python script from PBI desktop to a dataflow I get a "path is invalid" error. 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @thomas9921 ,

As far as I know, currently we can only run python script in power bi desktop because it needs packages on-premiss, dataflow is created in power bi service which is a cloud service that could not support Python / R script as a data source. We can only use python visuals in power bi service.

Refer: Python visualizations in Power BI Service 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @thomas9921 ,

As far as I know, currently we can only run python script in power bi desktop because it needs packages on-premiss, dataflow is created in power bi service which is a cloud service that could not support Python / R script as a data source. We can only use python visuals in power bi service.

Refer: Python visualizations in Power BI Service 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

collinq
Super User
Super User

hi @thomas9921 ,

 

I am not a python expert but accorsing to this, you have to use a full path and not a relative path.

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts

 

I would appreciate Kudos if my response was helpful. I would also appreciate it if you would Mark this As a Solution if it solved the problem. Thanks!



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.