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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mkravi
Frequent Visitor

Regarding Incremental Refresh in Power BI with databricks as source

Dear Community Members 

 

We have connected to ADLS2 using Databricks, as our data is going to be huge, so we are trying to use incremental policy functionality of power bi. But when we are going to do the same, we have found that tables that we have loaded doesn't support the query folding . I have checked in the applied steps and found that view native query is disabled. Request your guidance and support on to how to deal with such situation.

queries : 

how to deal with heavy data in  billions in power bi ( data source is Databricks)

how to implement incremental refresh while facing the above mentioned issue?

 

Early response will be appreciated. 

 

Thanks 

Ravi query folding issue.png

8 REPLIES 8
RobertUrbanski
Frequent Visitor

I was also able to get incremental refresh working with Azure Databricks.  Only I have a custom sql query that uses RangeStart and RangeEnd.  Here is the where clause of the custom query...
where date_created >= try_to_timestamp('"& Text.From(RangeStart) &"', 'M/d/yyyy h:mm:ss a')
and date_created < try_to_timestamp('"& Text.From(RangeEnd) &"', 'M/d/yyyy h:mm:ss a')

What is this part of your where clause? try_to_timestamp
I have a column that is a datetime named ASOFDATETIME and I am trying to update the SQL. 

Also using as a parameter so I can switch environments with a native query... I hope 🙂  

RBot_L
Regular Visitor

I managed to get it to work! I came across this post while looking for a solution so I hope this helps someone.

 

My solution was to use Databricks.Query instead of Databricks.Catalogs to load the table and write SQL statements to filter the table on the M code using Advanced Editor.

 

 

let
    Source = Databricks.Query(ServerHostName, HTTPPath, [Catalog=null, Database=null, 
    EnableAutomaticProxyDiscovery=null]),
    Table = "SELECT * FROM hive_metastore.bl.testtable",
    FilterRangeStart = " WHERE LastChanged >= timestamp '" &  DateTime.ToText(RangeStart, "yyyy- 
    MM-ddTHH:mm:ss") & "'", 
    FilterRangeEnd = " AND LastChanged < timestamp '" &  DateTime.ToText(RangeEnd, "yyyy-MM- 
    ddTHH:mm:ss") & "'", 
    Navigation = Source(Table & FilterRangeStart & FilterRangeEnd)
in
    Navigation

 

 

The parameters RangeStart and RangeEnd were not recognised as a timestamp so I had to specify they were a timestamp and convert them to text format in the exact same way as a timestamp.
 

Anonymous
Not applicable

I'm having the same issues here. It seems as if Power BI is not able to perform query folding any other than simple  renaming or casting and thus is not able to use the RangeStart and/or RangeEnd parameters in the query that is send out to the source system. In our case this makes incremental refresh completely useless, as refreshing seems only to take longer since it has several partitions and fires multiple exactly the same queries on the source system, which are subsequently handled by the Power BI engine and put into partitions.

Abhilash_P
Kudo Kingpin
Kudo Kingpin

HI @Tiff92 ,@mkravi ,@amitchandak
I am also facing similar issue any one resolved this..?

Regards

Tiff92
New Member

Hey I am having the same issue - have you resloved it and how? Thanks.

mkravi
Frequent Visitor

Hi Amit 

Thanks for your quickest response, appreciate the same.

even when i delete the additional column then also the view native query shows disabled 

The column on which i have to apply  the incremental custom filter is already datetime 

 

Do you think databricks will support query folding as so far i didn't see. 

 

And what is your opinion in doing incremental refresh even when the query folding is disabled .

amitchandak
Super User
Super User

@mkravi ,My Initial thoughts

Can you check if you can do your incremental setting before adding a conditional column? After source change datatype to datetime and do incremental setting.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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