Forum Discussion
vckbx
3 years agoHelper I
Set a maximum allowed dataset and/or dataflow refresh time?
I've had issues in the past where a transit PBI service issues causes a dataset to refresh indefinitely. Since we're on a PPU capacity I think it will go for up to 5 hours before failing. Is there an...
cassidy
3 years agoPower Participant
That's an interesting concept that you may be able to due using the REST API functions
Execute the Cancel:
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/cancel-refresh
Check on refresh status (thinking maybe you could call on in progress Refreshes and compare the Start Time to the Current Time, and if it's passed your threshold, execute Cancel and send email):
I'd also say that after many thousands of dataset refreshes, I've only personally encountered the 5 hour limit a handful of times. It's also worth noting that sometimes long refreshes appear to be on purpose as Power BI Service is managing capacity load, so cancelling and restarting may not have any positive impact.