cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Materialized View with Incremental Refresh - Change Data Feed required on source tables?

johnb1
Contributor

Question:

To create a materialized view with incremental refresh, is the Delta Lake feature Change Data Feed required on all of the source tables that the materialized view consumes? Or, is it not required for the creation of the materialized view, but for running the incremental refresh, i.e. would the materialized view created with the REFRESH POLICY = INCREMENTAL actually only perform full refresh if Change Data Feed is not enabled on at least one the source tables?

This documentation states that Change Data Feed is only recommended (i.e. not required), but I have found other sources stating that it is actually a requirement. I know that cited source is an official one, but I have found mistakes in the official Databricks documentation in the past with other topics, so I don't really trust this information.

1 REPLY 1

leopedroso1909
New Contributor III

Hi @johnb1 - Change Data Feed (CDF) is actually not an universal requirement for creating an incremental materialized view, but it will help with performance aspects for your pipeline and support on incremental strategy.

By using REFRESH POLICY = INCREMENTAL, Databricks can fall back to a full refresh when incremental refresh is not possible. By contrast, you may also want use REFRESH POLICY = INCREMENTAL STRICT with CDF disabled to test whether the view can be refreshed incrementally without silently falling back to a full refresh.