Optimising OData Refresh Efficiency in Energy Question for Energy BI and Excel

OData has been adopted by many software program options and has been round for a few years. Most options are utilizing the OData is to serve their transactional processes. However as we all know, Energy BI is an analytical answer that may fetch a whole bunch of hundreds (or tens of millions) rows of information in a single desk. So, clearly, OData is just not optimised for that form of goal. One of many largest challenges many Energy BI builders face when working with OData connections is efficiency points. The efficiency is determined by quite a few elements corresponding to the scale of tables within the backend database that the OData connection is serving, peak learn information quantity over durations of time, throttling mechanism to manage over-utilisation of assets and so on…

So, typically talking, we don’t count on to get a blazing quick information refresh efficiency over OData connections, that’s why in lots of instances utilizing OData connections for analytical instruments corresponding to Energy BI is discouraged. So, what are the options or alternate options if we don’t use OData connections in Energy BI? Properly, the perfect answer is emigrate the info into an middleman repository, corresponding to Azure SQL Database or Azure Knowledge Lake Retailer or perhaps a easy Azure Storage Account, then join from Energy BI to that database. We should determine on the middleman repository relying on the enterprise necessities, know-how preferences, prices, desired information latency, future assist requirement and experience and so on…

However, what if we shouldn’t have every other choices for now, and we’ve got to make use of OData connection in Energy BI with out blasting the scale and prices of the undertaking by shifting the info to an middleman house? And.. let’s face it, many organisations dislike the concept of utilizing an middleman house for varied causes. The best one is that they merely can’t afford the related prices of utilizing middleman storage or they don’t have the experience to assist the answer in long run.

On this publish, I’m not discussing the options involving any alternate options; as a substitute, I present some ideas and methods that may enhance the efficiency of your information refreshes over OData connections in Energy BI.


The information on this publish is not going to offer you blazing-fast information refresh efficiency over OData, however they’ll assist you to to enhance the info refresh efficiency. So in case you take all of the actions defined on this publish and you continue to don’t get a suitable efficiency, then you definitely would possibly want to consider the alternate options and transfer your information right into a central repository.

In case you are getting information from a D365 information supply, you could wish to take a look at some alternate options to OData connection corresponding to Dataverse (SQL Endpoint), D365 Dataverse (Legacy) or Widespread Knowledge Providers (CDS). However bear in mind, even these connectors have some limitations and won’t offer you a suitable information refresh efficiency. For example, Dataverse (SQL Endpoint) has 80MB desk measurement limitation. There may be another causes for not getting a superb efficiency over these connections corresponding to having additional large tables. Imagine me, I’ve seen some tables with greater than 800 columns.

Some recommendations on this publish apply to different information sources and aren’t restricted to OData connections solely.

Suggestion 1: Measure the info supply measurement

It’s all the time good to have an thought of the scale of the info supply we’re coping with and OData connection isn’t any totally different. In actual fact, the backend tables on OData sources might be wast. I wrote a weblog publish round that earlier than, so I recommend you employ the customized operate I wrote to know the scale of the info supply. In case your information supply is massive, then the question in that publish takes a very long time to get the outcomes, however you’ll be able to filter the tables to get the outcomes faster.

Suggestion 2: Keep away from getting throttled

As talked about earlier, many options have some throttling mechanisms to manage the over-utilisation of assets. Sending many API requests might set off throttling which limits our entry to the info for a brief time frame. Throughout that interval, our calls are redirected to a special URL.

Tip 1: Disabling Parallel Loading of Tables

One of many many causes that Energy BI requests many API calls is loading the info into a number of tables in Parallel. We are able to disable this setting from Energy BI Desktop by following these steps:

  1. Click on the File menu
  2. Click on Choices and settings
  3. Click on Choices
  4. Click on the Knowledge Load tab from the CURREN FILE part
  5. Untick the Allow parallel loading of tables choice
Disabling Parallel Loading of Tables in Power BI
Disabling Parallel Loading of Tables in Energy BI Desktop

With this feature disabled, the tables will get refreshed sequentially, which considerably decreases the variety of calls, subsequently, we don’t get throttled prematurely.

Tip 2: Avoiding A number of Calls in Energy Question

One more reason (of many) that the OData calls in Energy BI get throttled is that Energy Question calls the identical API a number of instances. There are lots of identified causes that Energy Question runs a question a number of instances corresponding to checking for information privateness or the best way that the connector is constructed or having referencing queries. Here’s a complete checklist of causes for working queries a number of instances and the methods to keep away from them.

Tip 3: Delaying OData Calls

When you’ve got finished all of the above and you continue to get throttled, then it’s a good suggestion to overview your queries in Energy Question and look to see when you’ve got used any customized features. Particularly, if the customized operate appends information, then it’s extremely seemingly that invoking operate is the perpetrator. The wonderful Chris Webb explains how you can use the Perform.InvokeAfter() operate on his weblog publish right here.

Suggestion 3: Think about Querying OData As a substitute of Loading the Complete Desk

This is among the greatest methods to optimise information load efficiency over OData connections in Energy BI. As talked about earlier, some backend tables uncovered by way of OData are fairly large with a whole bunch (if not hundreds) of columns. A standard mistake many people make is that we merely use the OData connector and get your complete desk and assume that we’ll take away all of the pointless columns later. If the underlying desk is massive then we’re in hassle. Fortunately, we will use OData queries within the OData connector in Energy BI. You may be taught extra about OData Querying Choices right here.

In case you are coming from an SQL background, then you could love this one as a lot I do.

Let’s take a look on the OData question choices with an instance. I’m utilizing the official take a look at information from the OData web site.

  1. I initially load the OData URL within the Energy Question Editor from Energy BI Desktop utilizing the OData connector
Using OData connector in Power BI Desktop
Utilizing OData connector in Energy BI Desktop
  1. Choose the tables, keep in mind we are going to change the Supply of every desk later
Selecting the tables from an OData connection
Choosing the tables from an OData connection


That is what many people usually do. We hook up with the supply and get all tables. Hopefully we get solely the required ones. However, the entire goal of this publish is just not to take action. Within the subsequent few steps, we modify the Supply step.

  1. Within the Energy Question Editor, choose the specified question from the Queries pane, I chosen the PersonDetails desk
  2. Click on the Superior Editor button
Advanced Editor in the Power Query Editor
Superior Editor within the Energy Question Editor
  1. Exchange the OData URL with an OData question
Querying OData in Power Query in Power BI
Querying OData in Energy Question in Energy BI
  1. Click on Accomplished

As you’ll be able to see, we will choose solely the required columns from the desk. Listed below are the outcomes of working the previous question:

Querying OData in Power Query
Getting information utilizing OData question

In real-wrold eventualities, as you’ll be able to think about, the efficiency of working a question over an OData connection can be a lot better than getting all columns from the identical connection after which eradicating undesirable ones.

The chances are countless in the case of querying an information supply and OData querying in no totally different. For example, let’s say we require to analyse the info for folks older than 24. So we will slim down the variety of rows by including a filter to the question. Listed below are the outcomes:

Using OData query filter
Utilizing OData question filter

Some Further Assets to Study Extra

Listed below are some invaluable assets to your reference:

Whereas I used to be searching for the assets I discovered the next wonderful weblogs. There are excellent reads:

As all the time, I’d be blissful to learn about your opinion and expertise, so depart your feedback under.

Have enjoyable!

Supply hyperlink

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button