A Power Query query’s ability to produce a single query statement to retrieve and transform source data is known as query folding. For reasons of efficiency, the Power Query mashup engine aims to achieve query folding whenever possible.
The subject of query folding is crucial to data modeling for a number of reasons:
- Import model tables: In terms of resource usage and refresh duration, data refresh for Import model tables (Power Pivot or Power BI Desktop) will proceed effectively.
- Each table in the DirectQuery and Dual storage modes (available only in Power BI) must be based on a Power Query query that can be folded.
Refreshing data incrementally will be effective in terms of resource usage and refresh time (only for Power BI). In fact, if query folding for the table is not possible, the Power BI Incremental Refresh configuration window will alert you with a warning. The purpose of incremental refresh is defeated if it cannot be achieved. In order to identify incremental changes, the mashup engine would then need to retrieve all source rows.
Take a deep dive into Power BI Course.
Power Query queries may undergo query folding for all of their steps or just a portion of them. If complete or partial query folding is not possible, the Power Query mashup engine must make up the difference by handling data transformations on its own. This procedure may entail obtaining the outcomes of the original query, which for large datasets is very resource intensive and slow.
reputable sources for folding
Query folding is supported by the majority of data sources that support the idea of a query language. Relational databases, OData feeds (including SharePoint lists), Exchange, and Active Directory are a few examples of these data sources. The majority of the time, data sources like flat files, blobs, and the web do not.