Forum Discussion

yedu's avatar
yedu
Frequent Visitor
11 months ago
Solved

Incremental Refresh with Power BI + Databricks – Query Folding Issue

Hi Community, I’m working on setting up Incremental Refresh in Power BI using Databricks as the source. I’ve created the RangeStart and RangeEnd parameters and applied the filters in Power Query. Th...
  • Shahid12523's avatar
    11 months ago

    Best Approach – Databricks.Query() with SQL filter

    Use Databricks.Query() instead of Catalogs.

    Write SQL like:

    SELECT * FROM schema.table
    WHERE LastChanged >= timestamp '...RangeStart...'
    AND LastChanged < timestamp '...RangeEnd...'

     


    This pushes filters to Databricks → query folding works (in Desktop).

    ⚠️ Dataflows Gen2 may incorrectly flag folding as unsupported (MS limitation).

     

    Delta Tables + Partitioning (if using Lakehouse/ADLS)

    Use DeltaLake.Table().

    Partition data on the datetime column.

    Even without folding, partition pruning makes refresh very fast.

     

    Default Catalog Path

    No folding → pulls full dataset each time.

    Works but slow for large data.