Incremental refresh of materialized view in serverless DLT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:40 AM
Hello, Every time that I run a delta live table materialized view in serverless , I get a log of "COMPLETE RECOMPUTE" . How can I achieve incremental refresh in serverless in DLT pipelines?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 07:00 AM
Hi @SharathE
Incremental refresh in DLT Materialized Views is dependent on many different factors, such as:
- What is the source of the query/function that is creating the MV
- The type of operation(s) that is happening within your query/function
- which DLT channel you are on (current/preview)
- If you are using Serverless or not (Generally, the latest and greatest features are available in serverless DLT)
But If your source for the MV is not Streaming Tables (e.g., Delta table), then you need to make sure to have the following features enabled on your source Delta tables:
- delta.enableChangeDataFeed": "true"
- "delta.enableRowTracking": "true"
However, looking at the JSON output of planning the MV in your DLT logs will provide you with more information on why a specific method has been selected.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2024 12:48 PM
Make sure you are using the aggregates and SQL restrictions outlined in this article. https://docs.databricks.com/en/optimizations/incremental-refresh.html
If a SQL function is non-deterministic (current_timestamp() is a common one) you will have a COMPLETE_RECOMPUTE every time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2025 05:48 AM - edited 09-03-2025 05:56 AM
I want to identify which rows were updated as part of the last refresh if it was an incremental refresh. Is there an external event log in the form of a table which could help in identifying this?
I was trying to achieve this using current_timestamp as a col in my SQL function, but then that makes it non-deterministic and so it runs as a COMPLETE_RECOMPUTE every time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2025 04:14 AM
So, I am using DLT declarative framework to work with MV in the gold layer. I am sharing code for the sample. So, can someone tell me that how we can do only the incremental refresh, as this code is doing a full refresh daily. I don't to want do again do the full refresh.
- My source of Gold layer is a streaming table.
- I am using Advance compute.
- Channel is Preview.