Web.Contents failed to get contents | (429): Data API call already in progress
I've got a quite complex report that gets a good set of different fields. When I run a refresh on Power BI Desktop, it takes a while but works. After publishing to the service, refreshes (manual and scheduled) fail consistently with "Web.Contents failed to get contents (429): Data APi call already in progress...". I figured Power BI Service is pulling data parallel and tried reducing queries into one proxy query from which my other queries then get their fields. With this constellation there are just too many fields in this one query and the SQL analysis service gets stuck and never finishes. So not good either. Now, I've got it divided into 4 queries with 4 different API keys, thinking the API server will then recognise that it's separate queries and not throw the 429, but to no avail. How do I get Power BI service to not process in parallel and honour my configuration of serial processing as Power BI desktop does? Alternatively, how can I avoid SQL Analysis Service to get stuck with too many columns? Any other suggestions how to approach this?
P.S.: On-demand request fails without error message (just an empty line) after 30 seconds from start time while scheduled refresh fails after 15-20 mins with the mentioned message (Web.Contents failed to get contents (429): Data API call already in progress). That's a bit strange, I think.
For now I had a closer look at the Web.Contents ManualStatusHandling option and think it should work to implement the wait-retry pattern for the 429 error. But saying that, I implemented it and get an error I cannot figure out.
"Expression.Error: The import Value.WaitFor matches no exports. Did you miss a module reference?".
My code for the query:
Source = Csv.Document(
waitForResult = Value.WaitFor((iteration) =>
result = Web.Contents("https://au...censored...com",[RelativePath="/api/v1/surveys/selfserve/...censored.../data?fields=uuid,age,gender,...censored...",
buffered = Binary.Buffer(result),
status = Value.Metadata(result)[Response.Status],
actualResult = if status = 429 then null else buffered
(iteration) => #duration(0,0,0,Number.Power(2, iteration)), 5)
[Delimiter=" ", Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
Any idea what I might be doing wrong and how to fix it?