Forum Discussion
stan255
1 year agoNew Member
Delay query to avoid hitting API limit
How can I add a delay between my queries to avoid hitting API limit? The API I'm querying limits me to 75 per minute. However, I have 500 queries to execute Query = (Stock as text) as table ...
Omid_Motamedise
1 year agoSuper User
You can add a finite loop by List.Generate to run for the time you need to pause query.
but became full as power query is lazy, it can be neglected, so add this as midd step of your calculation
- Omid_Motamedise1 year agoSuper User
You can use the below steps for example for a minute pause. (I use mobile so beware full about the spelling of functions)
T=DateTime.LocalNow(),
Timeafterpause=T+#duration(0,0,1,0),
Loop= List.Generate(()=>T, each _<Timeafterpause, each DateTime.LocalNow())