We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 6 | |
| 5 |