Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II
Helper II

Query folding handlers reference

What are all of the query folding handlers (OnTake, OnSkip, OnSelectRows etc.)? I did not find a reference listing all of them.
  • Which ones are the most important to implement? (I know GetType and GetRows are the mandatory Table.View handlers.)
  • Or alternatively, what should we consider when deciding which ones to implement?
    • Especially in regards to supporting Direct Query? Or Incremental Refresh?

I believe there were past discussions about this in the Issues section of microsoft/DataConnectors on GitHub, which may have answered the above questions. However, this content seems to have been deleted.
Helper II
Helper II


I found these links (which have been removed from the current documentation without being replaced): (in an older version of DataConnectors repo)

Super User
Super User

Query folding handlers are a set of functions in PowerBI's data connector API that allow you to control how data is transferred from a data source to PowerBI. The most commonly used query folding handlers include:

  • OnTake: controls how many rows are returned from the data source
  • OnSkip: controls how many rows are skipped before the data is returned
  • OnSort: controls how the data is sorted before being returned
  • OnFilter: controls how the data is filtered before being returned
  • OnColumns: controls which columns are returned from the data source
  • OnGroup: controls how the data is grouped before being returned
  • OnSelectRows: combines OnTake, OnSkip, OnSort, OnFilter, OnColumns, and OnGroup into one function call.

The most important handlers to implement depend on the specific use case and the requirements of your data source. However, to support Direct Query, the OnSelectRows and OnGetRows handlers are important. To support Incremental Refresh, the OnGetRows and OnGetSchema handlers are important.

When deciding which handlers to implement, consider the following factors:

  1. The capabilities of your data source: not all data sources support all handlers
  2. The performance and scalability requirements: some handlers can be more resource-intensive than others
  3. The data privacy and security requirements: some handlers may expose sensitive data
  4. The functionality required by PowerBI: some handlers are required to enable certain PowerBI features.

It's recommended to consult the PowerBI documentation and reach out to the PowerBI support team for more information on query folding handlers and best practices for implementation.

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.