Forum Discussion
Value.NativeQuery bypass Query Folding?
- Anonymous2 years ago
Value.NativeQuery is a query written in the source's native language, which is what query folding does with M code. There is no need for query folding on a NativeQuery, because it already is a Native Query.
--Nate
There is written: This article showcases an alternative method to create native queries against your data source using the Value.NativeQuery function and keep the query folding mechanism active for subsequent steps of your query.
This seems to be the closest answer to my question. Although it mentions that users can write native queries, it doesn’t explicitly state that Query Folding does not occur for the transformation step with Query Folding. I’ve encountered situations before where I assumed one thing, but the reality was different. Therefore, I want to be certain I understand this correctly.
If I’m mistaken, could you please provide the exact text that explicitly confirms Query Folding does not occur during the transformation step when using the Value.NativeQuery function?
You are missing the bigger picture. Native Queries fold by definition, but they also prevent further folding in subsequent steps. UNLESS you indicate that they support it.