Skip to main content

Power BI

Needs Votes

Optimize oData Queries

Vote (11) Share
Lloyd Jefferies's profile image

Lloyd Jefferies on 09 Oct 2015 23:51:55

Currently when you design an OData feed some information is left out which you can see when executing in the browser, you then need to expand out the record and all of a sudden the query seems to take an age to run, even though it executed in less than a couple of seconds in your browser. This is not good, please investigate this.

Comments (4)
Lloyd Jefferies's profile image Profile Picture

Fred Lorrain on 05 Jul 2020 22:27:13

RE: Optimize oData Queries

I've found an alternative to the failing OData connector.
When trying to retrieve data from SharePoint I'm now using Json.Document(Web.Contents("URL",[Headers=[accept="application/json"]]))

This call do the job by calling a single http request and get a Odata Json answer.

Lloyd Jefferies's profile image Profile Picture

Power BI User on 05 Jul 2020 22:27:10

RE: Optimize oData Queries

A way to optimize a little bite the query is to specify the OData version in the parameters

ODate.Feed("URL",[],[ODataVersion=4])

BUT

The real main issue is coming from the connector itself that is generating several HTTP request isntead of just one and even worst its calling the $metadata of the OData feed that is extremly heavy.

You can use Fiddler to check how badly Power Query is dealing with OData.

Lloyd Jefferies's profile image Profile Picture

Fred Lorrain on 05 Jul 2020 22:27:04

RE: Optimize oData Queries

Same issue on my side even by using $select and $filter queries takes ages and retrieve too much data compare to what is needed.
I'm testing the usage of XML connector instead of OData that is not performant enough.
It's really a shame especially because OData is a nice way to retrieve data from SharePoint.

Lloyd Jefferies's profile image Profile Picture

Tom Nilsen on 05 Jul 2020 22:13:19

RE: Optimize oData Queries

I have the same problem. It take alot of time when we run different oDate Queries. I have tried to remove all colums that we dont use but the speed is still slow