Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Dear All, I have written an API call to request data from our team's UiPath Orchestrator server. (using odata, swagger 2.0)
Here I would like to use incremental refresh, to request only data between RangeStart and RangeEnd parameters required for incremental refresh.
The incremental refresh seems to be working when I'm filtering the already downloaded data, but here in the request somehow does not work, cannot recognize the data behind the parameter. I just need to filter the downloaded data already here, because the api call takes unnecessarily long time - more than half an hour and a lot of memory during the data transfer.
The request itself is fine working when I'm changing the parametername to a static datetime text in the right format.
Could you help me how to fix it if possible? Thank You!
Edit: the code works in PowerBI Desktop mode but does not in online "service" mode.
The piece of code:
Path = "/odata/QueueItems?$filter=(QueueDefinitionId eq 311 or QueueDefinitionId eq 95) and CreationTime gt "&DateTime.ToText(RangeStart,"yyyy-MM-dd'T'HH:mm:ss'Z'")&" and CreationTime le "&DateTime.ToText(RangeEnd,"yyyy-MM-dd'T'HH:mm:ss'Z'"),
Auth = Json.Document(Web.Contents(BaseUrl, [Headers=[#"Content-Type"="application/json"], Content=Json.FromValue(Credentials), RelativePath="/api/account/authenticate"])),
Token = Auth[result],
Source = Json.Document(Web.Contents(BaseUrl, [Headers=[Accept="application/json", #"Authorization"="Bearer " & Token], RelativePath=Path, Timeout=#duration(0,0,30,0) ])),
Hi @Anonymous ,
Have you figured out the issue? Is it working in Power Bi service?
TIA
Hi @Mrithya, yes there was a bug with power BI, not with my report/Dataset. I had to publish the report + dataset to a new created workspace,and the request immediately worked for me.
Hi @Anonymous - have you considered using the Power Query Diagnostic or Fiddler trace to see how many times the Power Query is executing the API call. I just think it might be attempting to call the data multiple times so the 30 minute time out never occurs. You could probably confirm that Power Query is doing something unnecessary from call the API in Visual Studio Code or Postman.
If you find that Power Query is doing something unusual, you may want to consider switching to using Power Automate to call the JSON file. Store the JSON file in SharePoint, or parse it into a Dataverse table.