Forum Discussion
Query Folding is not enabled for custom connector with source as API
- 1 year ago
Hi Anonymous,
Thank you for posting your query in Microsoft Fabric Community Forum.Based on your implementation, the root cause is that query folding is not being triggered because Table.View has null as its first argument. For query folding to work, this should be a valid data source reference, not null.
Additionally, your Web.Contents call should use the RelativePath and Query fields for Power BI to recognize the call as foldable. I suggest the following steps which are useful to you.
- Replace null in Table.View with a valid source object like [Name = "MyCustomAPI", Kind = "MyCustomConnector"].
- Update Web.Contents to use RelativePath and Query instead of concatenated URLs.
- Ensure you handle options[RowFilters] properly and log it temporarily to check if folding is happening.
Also, here I provided some official Microsoft Documents for more information:
Table.View - PowerQuery M | Microsoft Learn
TripPin 10 - Basic Query Folding - Power Query | Microsoft Learn
Understanding query evaluation and query folding in Power Query - Power Query | Microsoft Learn
OData comparison operator reference - Azure AI Search | Microsoft Learn
There is a detailed community discussion that covers these folding requirements in the context of Table.View, which you may find helpful:
Can we enable folding for custom query
Please check whether the schema is correctly typed and that your filter expression uses valid OData syntax. Also, make sure your API respects these query parameters.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Hi Anonymous,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you.
Hi Anonymous,
Hope you had a chance to try out the solution shared earlier. Let us know if anything needs further clarification or if there's an update from your side always here to help.
Thank you.
- v-kpoloju-msft1 year agoCommunity Support
Hi Anonymous,
Just wanted to follow up one last time. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.