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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aoliver
Helper III
Helper III

PowerBI Service with Python as Data source

Hello everyone, 
I use a python script as a datasource in a report. In desktop version works fine.

The problem is when I try to refresh it in powerBI Service, I have a lot of doubts:

  • It is possible to run Python Scripts in the PowerBI Services?
  • I read a lot of threads, that shows that you need a gateway in personal mode, it is right?
  • The dataframes loaded have a limit size?

Remember that I use python only to load data, and NOT to create a visual (Which its supossed to have the size limit)

My idea is to scheduled the refreshed of this report. 

More data: The machine which has the gateway (enterprise) can run python. How can I configure the path of interpreter?


Thanks in advance, and sorry for any missunderstanding, there are a lot of questions

Cheers

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @aoliver ,

 

Based on this documentIt is not supported to implement schedule refresh via on premise Data Gateway (Enterprise Gateway) for Python in Power BI Service currently .

 

  • To enable scheduled refresh of your Python dataset, you need to enable Scheduled refresh and have a Personal Gateway installed on the computer that houses the workbook and the Python installation. 
  • You'll need to have the pandas library installed in your Python environment for the previous script code to work properly.
  • For the Python scripts to work properly in the Power BI service, all data sources need to be set to public.
  • Nested tables (table of tables) are currently not supported

Based on my research, Python script execution on the Power BI Desktop and personal gateway has the same dataframe size and PNG image size limits, but the execution time limit is 300 seconds. Other constraints are not applicable to Power BI Desktop and personal gateway. Please refer to this blog: https://powerbi.microsoft.com/en-us/blog/python-visualizations-in-power-bi-service/


Best regards,

 

Community Support Team _ Dong 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-lid-msft
Community Support
Community Support

Hi @aoliver ,

 

Based on this documentIt is not supported to implement schedule refresh via on premise Data Gateway (Enterprise Gateway) for Python in Power BI Service currently .

 

  • To enable scheduled refresh of your Python dataset, you need to enable Scheduled refresh and have a Personal Gateway installed on the computer that houses the workbook and the Python installation. 
  • You'll need to have the pandas library installed in your Python environment for the previous script code to work properly.
  • For the Python scripts to work properly in the Power BI service, all data sources need to be set to public.
  • Nested tables (table of tables) are currently not supported

Based on my research, Python script execution on the Power BI Desktop and personal gateway has the same dataframe size and PNG image size limits, but the execution time limit is 300 seconds. Other constraints are not applicable to Power BI Desktop and personal gateway. Please refer to this blog: https://powerbi.microsoft.com/en-us/blog/python-visualizations-in-power-bi-service/


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for all your answers!!!

Cheers

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.