Forum Discussion
Power Query request data every 5 minutes even I set timeout 30 minutes
Hello, I have a query that requests data from external API
I know that it takes a lot of time to get the answer so I set a timeout 30 minutes
= Json.Document(Web.Contents("url",[Timeout=#duration(0,0,30,0)]))But somehow PowerBI requests the data every 5 minutes. It seems that if it doesn't reseive an answer in 5 minutes it makes another request, that creates a lot of parallel requests to database (we have logs so I can see that it requests multiple times every 5 minutes)
Can somebody help me how I can force PowerBI NOT to request data every 5 minutes and respect timeout?
2 Replies
- BA_PeteSuper User
Hi nikolai_nopost ,
The timeout argument doesn't stop the query trying for that amount of time, it tells it when to give up. It may make many attempts during that time but, after 30 mins, it will return a fail.
I think what you want to use is Function.InvokeAfter(), where you can actually limit the calls via a specified time delay.
Check out Chris Webb's blog here:
https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/
You'll obviously need to correctly integrate it within your current query, but I think this is the function you need.
Pete
- kudavRegular Visitor
Hi, Nikolai.
How did you set up Power BI to request the data every 5 minutes?