Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am running a simple HTTP request to return a CSV from a service. I first use the Source step to request that a report is run, I then parse the output to get a runId variable which I then plug into the main request. Since the report takes 10-15 seconds to run i use the Function.InvokeAfter to be sure it's done before I get the report.
let
Source = Json.Document(Web.Contents("url to run the report", [Headers=[#"Content-Type"="type", Accept="type", Authorization="API key"], Content=Text.ToBinary("body method")])),
params = Source[params],
runId = Text.From(params[runId]),
doc = Function.InvokeAfter( () => Csv.Document(Web.Contents("url to get the report"&runId&".csv", [Headers=[#"Content-Type"="type", Authorization="API key"]]),[Delimiter=",", Columns=33, Encoding=65001, QuoteStyle=QuoteStyle.Csv]),#duration(0,0,1,0))
in
doc
This works as expected in the Power Query window returning the report. However every time I close and load into the Report Builder I get a 404 error:
I assumed it was to do with the wait time but I changed it to 5 and 10 minutes which made no difference (while still returning correctly in Power Query after the delay).
Any suggestions? What could cause difference behavior outside of Power Query?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |