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

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.

Reply
xli629b
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.
2 REPLIES 2
xli629b
Helper II
Helper II

FYI: 

I found these links (which have been removed from the current documentation without being replaced):
https://github.com/microsoft/DataConnectors/blob/00b30f78143873b0bff60335ed53069288aad6db/docs/table... (in an older version of DataConnectors repo)

jaweher899
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

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.