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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
eliele
Frequent Visitor

Python Script Automatic Refresh

Does Power BI Web Service support automatic refresh with Python Scripts? It doesn't even give me an option to set up a Gateway.

 

Below is the email I keep getting when I set up automatic refresh. 

Power BI.PNG

 

Thank you!

8 REPLIES 8
v-shex-msft
Community Support
Community Support

HI @eliele ,

What code you test? Can you please explain more about this?
In addition, power bi has limitation on run python script, please take a look at following link to know about this:

Run Python scripts in Power BI Desktop

Current it only support import mode to get data, live mode seem not works. (you can install a personal gateway to handle refresh)
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

I have written python script with database query,after designing reports and published on services (used personal gateway for schedule refresh) I am not getting refreshed reports.Not even after refreshing in desktop.Please help me out.....Thanks in advanced

Hey @v-shex-msft ,

 

All I do is data manipulation in Python. I import data from a database that with no problem automatically updates, and then do some data manipulation using python. I do not use python to import data - only to manipulate the current data. 

 

In terms of Gateway, it doesn't even give me an option to setup one like with R. If I manipulate data with R, the Dashboard gets automatically updated using the Gateway; if I use python, it doesn't.

 

Below are the modules I use:
import datetime
from datetime import timezone
import time
import dateutil
import calendar
import pandas as pd

 

Thank you!

 

 

HI @eliele ,

As I said, current it only support to use personal gateway to handle python scripting data source refresh, you can take a look at following blog to know more about this:

Python visualizations in Power BI Service

Python support in Power BI personal gateway

Python can be used for data preparation or for analytics in your Power BI reports, either with a Python script data connector or by using a Python script in the Power Query editor for data transformation.

When you publish a Power BI report with Python scripts to the service, these scripts will also be executed when your data is refreshed through the on-premises data gateway in personal mode (personal gateway).

To enable this, you must ensure that the Python runtime with the dependent Python packages are also installed on the machine hosting your personal gateway. Note, Python script execution is not supported for on-premises data gateways shared by multiple users.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hello, 

 

I have the same problem.
I'm using Python in the query editor for data manipulation and clustering with k-means.


My dataset contains around 6 million rows (import mode).


On the powerbi desktop I have not had issues for the refresh.


But on the Powerbi web service the refresh is not possible.
Somebody has fund a solution for this issue?
If is not possible yet, could you tell me when ?

 

Thank you very much. 

Any update on when Power BI Server will suport Python Automatic Refresh?

Is there an update on if the Data Gatewat support Python Schedule Refresh?

 

Capture.PNG

eliele
Frequent Visitor

@Anonymous FYI it works now

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors