Forum Discussion
Power BI connected to Salesforce datasource - How to check if query folding is happening ?
I am connecting Power Bi to Salesforce using Power Bi Salesforce Object Connector. My aim to establish incremental refresh. Since incremental refresh in Power Bi requires Query folding , how do I check if query folding is happening with my Salesforce data ? Is there any tool to trace the query sent back to Salesforce from Power BI.
Please note in this case , the 'View Native Query' option in Power Query is greyed out.
yes, that's exactly what it means. Most simple filters are supported, some are transformed from relative to absolute. But anything more complex than that is not currently supported.
It's good enough for incremental refresh.
6 Replies
- lbendlin
Super User
You can see it when you run diagnostics on your Power Query transformation step. You can also see it in Fiddler or in the Dev tools on Chromium browsers.
Note that things like YESTERDAY or LASTDAYS:10 are not supported directly. Power Query will translate that into absolute dates for the SOQL. Still works.
- AnonymousNot applicable
Hello lbendlin ,
Thanks for this tip ! Some progress .. I used Power Query Diagnostics on the transformation steps.
My transformation steps consists of 1) Filtered Columns 2) Date filter on Rows
I observed the transformation column filter and the Date filter included in the 'data source query' column (in the 'Diagnostics detailed..' table generated ); Ie the datasource query did have these transformations (select column1, column 2 and where date >= clause) .
Does this mean that query folding is indeed happening with Salesforce datasource eventhough the 'view native query' is disabled, I wonder ? What are your thoughts on this ?
My next step is setting up incremental refresh.
Thanks
- lbendlin
Super User
yes, that's exactly what it means. Most simple filters are supported, some are transformed from relative to absolute. But anything more complex than that is not currently supported.
It's good enough for incremental refresh.
- v-xuding-msft
Community Support
Hi Anonymous ,
If the View Native Query option is not enabled (greyed out), this is evidence that all query steps cannot be folded. However, it could mean that a subset of steps can still be folded. Working backwards from the last step, you can check each step to see if the View Native Query option is enabled. If this is the case, then you have learned where, in the sequence of steps, that query folding could no longer be achieved.
You could reference the document below to check if the transformations that can be query folded.
Transformations that can achieve folding
And this blog may help you as well.
- lbendlin
Super User
v-xuding-msft Query folding for Salesforce objects is not currently indicated through the View Native Query link. It can only be observed the way I described. Hopefully this will be improved in the future, together with custom SOQL query support including subqueries. That would finally give us the possibility to recreate ReportTypes in SOQL.
- metrica
Post Prodigy
Hi everyone,
I know I'm replying very late to this thread, but for anyone still landing here from search and dealing with the same incremental refresh + folding-visibility puzzle - worth knowing there's a way to skip the folding-detection dance entirely.
Power BI Connector for Salesforce on AppExchange handles data extraction on the Salesforce side - you configure filters and field selection in a UI inside Salesforce, and only the scoped subset reaches Power BI. So you don't need to verify whether folding worked, because the filtering already happened before the data left Salesforce. Incremental refresh setups stay predictable.
Free 30-day trial if you'd like to test it on your own objects. Setup guides at https://metricasoftware.com/, demo available on request.
Cheers,
Metrica Team.