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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
HamidBee
Power Participant
Power Participant

How can I use Python to schedule a data refresh?

I understand that there are limits to the amount of scheduled refreshes one can make when following the traditional route with no coding. Is there a way to write a python script to schedule a data refresh?. If so, how can I go about doing this?.,

 

Thanks in advance.

1 ACCEPTED SOLUTION
tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @HamidBee ,

 

You could use the "refreshes" API endpoint in Power BI. Here a blog post on this:

 

https://pbi-guy.com/2022/01/07/refresh-a-power-bi-dataset-with-python/

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
tackytechtom
Most Valuable Professional
Most Valuable Professional

Hi @HamidBee ,

 

You could use the "refreshes" API endpoint in Power BI. Here a blog post on this:

 

https://pbi-guy.com/2022/01/07/refresh-a-power-bi-dataset-with-python/

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Thanks for the link. I'll go through it carefully. The only thing that I was dissapointed to learn was this part

 

"Keep in mind that the limitation of your licensing can’t be eliminated. This means if you’re using the Power BI Free license you can programmatically refresh a dataset once a day. With a Pro License it’s eight times a day, and with Premium or Premium per User it’s 48 (see https://docs.microsoft.com/en-us/power-bi/connect-data/refresh-data#data-refresh)."

 

I was hoping Python would eliminate this limitation entirely. 

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.