This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
We have a native sql query as source, with queryfolding and with a second step to filter a date column for incremental refresh.
We also want to add query hints, such as OPTION (LABEL='small') which is a classifier for sql pools to assign less resources to the query.
The problem is: the query hint should be at the END of the query, and do to queryfolding, the hint gets wrapped as a subquery and therefore the hint is not at the end, thus throwing an error.
Any ideas? Why would sql.nativequery not support extra parameters for these query options?
https://learn.microsoft.com/en-us/sql/t-sql/queries/option-clause-transact-sql?view=sql-server-ver16
Hi @Devale1
To resolve the issue of placing SQL query hints at the end when using query folding with incremental refresh:
Query Folding Behavior:
Issue:
Disable Query Folding for Incremental Refresh:
Manually Add the Query Hint:
Alternative Approach:
This should allow you to properly use the query hint in your SQL query. Let me know if you need further clarification!
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Please Subscribe my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Include the RangeStart and RangeEnd filter as part of the native query.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |