Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mmarcoux
Regular Visitor

Query folding with incremental refresh in dataflows gen2 using Databricks.Query() connector

Hello All,

We are testing incremental refresh in Dataflows Gen2 using the Databricks connector and are running into a query folding validation error. The validation fails with the message that the query is not folding, even though in the Power Query editor the applied steps show the green folding indicator.

mmarcoux_0-1755364347410.png

 

mmarcoux_1-1755364389253.png



The query is written using the Databricks.Query() syntax, which has been suggested as the correct approach for enabling folding with Databricks catalogs. When attempting to validate incremental refresh, Dataflows Gen2 does not appear to recognize the query as foldable.

mmarcoux_2-1755364518782.png


The query destination is a fabric warehouse.

Documentation on native query folding indicates that Databricks is not currently listed among the supported sources, and the use of Value.NativeQuery() for folding is also not supported with Databricks. However, there is no mention of the Databricks.Query() connector in the folding documentation.

Based on this, it seems incremental refresh with query folding is not currently supported for Databricks in Dataflows Gen2. Can Microsoft confirm whether this is the case, and if support for Databricks query folding with incremental refresh is on the roadmap?

Example M Code using Databricks.Query():

let
  Result = Databricks.Query(
    "your-databricks-workspace-url",
    "/sql/1.0/warehouses/your-warehouse-id",
    [Catalog = null, Database = null, EnableAutomaticProxyDiscovery = "enabled"]
  )(
    "SELECT * FROM your_catalog.your_schema.your_table"
  )
in
  Result

 

References:

1 ACCEPTED SOLUTION
v-agajavelly
Community Support
Community Support

Hi @mmarcoux ,

Thanks for clarifying, I see what you mean now. You’ve already confirmed query folding is working correctly (green lightning icon and supported syntax), so the issue isn’t with your M code or transformations.

What you’re running into is more about how incremental refresh validation in Dataflows Gen2 checks for foldability. At the moment, that validation logic doesn’t seem to recognize the Databricks connector the same way it does for SQL-based sources (like SQL Server, Synapse, etc.). That’s why you still get the “query is not foldable” error even though folding indicators show it is.

From what’s documented today, incremental refresh in Gen2 officially supports only a limited set of connectors, and Databricks isn’t yet on that list. So this looks less like a mistake on your side and more like either:

  • a limitation/unsupported feature (incremental refresh not yet enabled for Databricks in Gen2), or
  • a bug in how the validation step is detecting foldability.

If you haven’t already, I’d recommend logging this on the Fabric Ideas - Microsoft Fabric Community or raising a support ticket through the How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn. That’s the best way to get confirmation from the product team on whether this is an unsupported scenario or a bug, and to track if/when Databricks query folding support for incremental refresh in Dataflows Gen2 is on the roadmap.

Regards,
Akhil.


View solution in original post

3 REPLIES 3
v-agajavelly
Community Support
Community Support

Hi @mmarcoux ,

Thanks for clarifying, I see what you mean now. You’ve already confirmed query folding is working correctly (green lightning icon and supported syntax), so the issue isn’t with your M code or transformations.

What you’re running into is more about how incremental refresh validation in Dataflows Gen2 checks for foldability. At the moment, that validation logic doesn’t seem to recognize the Databricks connector the same way it does for SQL-based sources (like SQL Server, Synapse, etc.). That’s why you still get the “query is not foldable” error even though folding indicators show it is.

From what’s documented today, incremental refresh in Gen2 officially supports only a limited set of connectors, and Databricks isn’t yet on that list. So this looks less like a mistake on your side and more like either:

  • a limitation/unsupported feature (incremental refresh not yet enabled for Databricks in Gen2), or
  • a bug in how the validation step is detecting foldability.

If you haven’t already, I’d recommend logging this on the Fabric Ideas - Microsoft Fabric Community or raising a support ticket through the How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn. That’s the best way to get confirmation from the product team on whether this is an unsupported scenario or a bug, and to track if/when Databricks query folding support for incremental refresh in Dataflows Gen2 is on the roadmap.

Regards,
Akhil.


AnkitKukreja
Super User
Super User

Hi! @mmarcoux 

 

Did you try checking https://learn.microsoft.com/en-us/power-query/step-folding-indicators. 
Generally when we try to setup incremental refresh, we need to ensure that the steps used are supported as a native query and it can work as a SQL query. Also, as you see in the solution of the community thread that you shared should help you understand that how simple the code should be.

 

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Hello @AnkitKukreja,

Thanks for the reply,

I have validated that the steps used are supported as a native query, as indicated in the thread you linked:

mmarcoux_0-1755529872073.png


You can see that from the screenshot in my initial post that this is indeed the case.

The example M code I provided uses the same syntax as the solution thread, and trying variants of the same syntax, I.E. using Value.NativeQuery() wrapped around Databricks.Catalog(), which also shows that the query is indeed folding.

The key point here is not that the query is not folding (by all accounts it is indeed folding), it is that the incremental refresh in dataflows Gen2 gives the error that the query is not foldable, which seems to be either a bug, or an unsupported feature with the connector I am using.

Appreciate the response.

Matt



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors