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
gebberryOffice
Advocate I
Advocate I

Dataflows don't support Query Folding?

Working with a DataFlow on premium... because there is too much data to manipulate (100MM+rows) locally.

 

Issue is it seems on service dataflows don't support query folding?  hunh?  

 

I created a custom Parameter.. called MinDate, so that when I edit the PBIX on desktop.. I set MinDate to a date in the future.  My last step of pulling the Data flow.. is to set Date > MinDate.

 

when I close and apply... desktop pulls back all 24 gb of data..long long wait, and then applies the filter (0gb of data in the pbix)

 

when I publish up.. same thing..have to wait for all the data.

we've tried a number of other things..using a linked flow as the source in dataflows but always come back to the same issue... dataflows don't support query folding?  hunh?

 

How can I edit my Dataset/Model?  Without having to wait so long.

 

Using native query with query folding and the paramater worked way better.

 

Any ideas on how I can edit without a 2 hour wait..and waste of bandwidth.

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @gebberryOffice ,

 

  1. For your first question:>>Issue is it seems on service dataflows don't support query folding?

 

Checking if query folding takes place is simply done by right-clicking on a step in the query editor and by verifying if the "view native query" option isn't greyed out.

If "View Native Query" is greyed out, it means query folding isn't taking place for that step.

 

3.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

You can refer to the links: https://www.mssqltips.com/sqlservertip/3635/query-folding-in-power-query-to-improve-performance/

                                               http://blog.pragmaticworks.com/power-bi-checking-query-folding-with-view-native-query

 

Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

 

  1. For your second question:>>How can I edit my Dataset/Model?  Without having to wait so long.

 

You can optimize your model from respects below:

  • Tables or columns that are unused should be removed if possible. 
  • Avoid distinct counts on fields with high cardinality – that is, millions of distinct values.  
  • Take steps to avoid fields with unnecessary precision and high cardinality. For example, you could split highly unique datetime values into separate columns – for example, month, year, date, etc. Or, where possible, use rounding on high-precision fields to decrease cardinality – (for example, 13.29889 -> 13.3).
  • Use integers instead of strings, where possible.
  • Be wary of DAX functions, which need to test every row in a table – for example, RANKX – in the worst case, these functions can exponentially increase run-time and memory requirements given linear increases in table size.
  • When connecting to data sources via DirectQuery, consider indexing columns that are commonly filtered or sliced again – this will greatly improve report responsiveness.  

For more guidance on optimizing data sources for DirectQuery, see DirectQuery in SQL Server 2016 Analysis Services.

 

You can refer to the links to learn more: https://docs.microsoft.com/en-us/power-bi/power-bi-reports-performance,

 

Best Regards,

 

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
aechague
Advocate II
Advocate II

Same question here... Trying to optimize a dataflow that calls data from another dataflows does not accelerates the processing time, perhaps due to lack of query folding...

DebbieE
Community Champion
Community Champion

I havent seen an answer on this. Is it a yes or a no> Do dataflows support query foldign because right clicking on each Applied step, I dont even get the native query option. Let alone see it greyed out

 

v-xicai
Community Support
Community Support

Hi @gebberryOffice ,

 

  1. For your first question:>>Issue is it seems on service dataflows don't support query folding?

 

Checking if query folding takes place is simply done by right-clicking on a step in the query editor and by verifying if the "view native query" option isn't greyed out.

If "View Native Query" is greyed out, it means query folding isn't taking place for that step.

 

3.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

You can refer to the links: https://www.mssqltips.com/sqlservertip/3635/query-folding-in-power-query-to-improve-performance/

                                               http://blog.pragmaticworks.com/power-bi-checking-query-folding-with-view-native-query

 

Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

 

  1. For your second question:>>How can I edit my Dataset/Model?  Without having to wait so long.

 

You can optimize your model from respects below:

  • Tables or columns that are unused should be removed if possible. 
  • Avoid distinct counts on fields with high cardinality – that is, millions of distinct values.  
  • Take steps to avoid fields with unnecessary precision and high cardinality. For example, you could split highly unique datetime values into separate columns – for example, month, year, date, etc. Or, where possible, use rounding on high-precision fields to decrease cardinality – (for example, 13.29889 -> 13.3).
  • Use integers instead of strings, where possible.
  • Be wary of DAX functions, which need to test every row in a table – for example, RANKX – in the worst case, these functions can exponentially increase run-time and memory requirements given linear increases in table size.
  • When connecting to data sources via DirectQuery, consider indexing columns that are commonly filtered or sliced again – this will greatly improve report responsiveness.  

For more guidance on optimizing data sources for DirectQuery, see DirectQuery in SQL Server 2016 Analysis Services.

 

You can refer to the links to learn more: https://docs.microsoft.com/en-us/power-bi/power-bi-reports-performance,

 

Best Regards,

 

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

that answer doesn't really help that option is not available for dataflows.. which always have that option greyed out, at least for the march/april updates of desktop.

 

After further research testing what I found is this in case it helps anyone:

Native query does work if you define all the flows in the same powerquery.  eg don't create 1 query vs a flowand then refer to it in another.. but create the reference in the same flow..and it will fold.

 

Using below as sample FlowB does NOT fold,  FlowC DOES Fold (!!)

 

eg 

FlowA =

let

  source = flow("abc")

in 

 source

 

FlowB = 

let

  source = flow("bcd")

  output=  table.combine(FlowA, source)

in

  output

 

FlowC =

  let

       source = flow("bcd")

       source2 =flow("abc") 

       output = table.combine (source, source2)

in 

      output

 

Anonymous
Not applicable

Thanks for the input! I am also struggling a bit with the overall performance of Power BI Dataflows. 

I tried to load common dimensions/facts from SQL to Power BI Dataflows, so I only have to load once a day, and datasets don't bother SQL anymore regarding dataset refreshes (because Dataflows would be the entermediate data layer). 

 

Loading Dataflows is duable, but than I have to load 20 datasets from those dataflow entities, and there I run in multiple 'slow queries' because it is probably not folding the queries (like it would normally if connect directly to SQL). So in Power BI Premium you'll get a lot of 'out of memory' issues because of slow queries. 


My next step is to try the 'enhanced compute' feature in Power BI Premium, and connect all my datasets to Dataflow Linked Entities and try to measure if there is a performance boost. 

 

I think the Dataflow concept is really great and is definately the way forward, will need to mature a bit I think, it also needs to have some more Enterprise features. (versioning, roles & data security, overwriting existing Dataflow entities via API.)


@gebberryOffice let me know if you have some need experiences/insights with Dataflows, because this was an older post. Thanks!

Hello @Anonymous Were you able to find a viable solution? Did using the linked entities make a significant difference?

Anonymous
Not applicable

Hi @Anonymous & @robarivas. Were you guys able to find any solution for this. 

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.