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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
AUaero
Responsive Resident
Responsive Resident

Query Folding and Query References

Hey folks, I can't find the answer to this in the docs, so maybe someone here can clarify.  I have a Power Query script that pulls data from a SQL Server table.  Call this query A.  This query folds just fine as indicated by the fact that I can view the native query in PQ.  If I create a new query that references the query A (call this one query B), I can't view the native query.  Am I correct in assuming that the reference to query A breaks folding for query B?

We use a stage/load pattern for all of our PQ development where we stage untransformed tables but don't load them to PBI.  We then do any transformations against a reference to the staged table and then load the transformed table to PBI.  If this breaks folding then we'll need to rethink our approach.

 

Thanks!

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Not being able to view the native query doesn't always mean that it won't fold. In this case, I think it probably is still folding but just isn't generating the native query preview. Try adding a simple filter step after referencing and see if it shows the native query option or not (this works for me on a simple example I just tried).

 

For more on this, I recommend this Guy in a Cube video:

https://www.youtube.com/watch?v=QEFze-LdLqo

(You can skip the first 3 minutes to jump right to the relevant part.)

View solution in original post

3 REPLIES 3
ajinkyacgaikwad
Advocate I
Advocate I

Please watch this video on Query Folding: https://youtu.be/_8WUVlYGekk

AlexisOlson
Super User
Super User

Not being able to view the native query doesn't always mean that it won't fold. In this case, I think it probably is still folding but just isn't generating the native query preview. Try adding a simple filter step after referencing and see if it shows the native query option or not (this works for me on a simple example I just tried).

 

For more on this, I recommend this Guy in a Cube video:

https://www.youtube.com/watch?v=QEFze-LdLqo

(You can skip the first 3 minutes to jump right to the relevant part.)

Thanks, Alexis - I tested as you suggested and you're right, query folding is still in effect. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.