cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Delta Live Table (DLT) Initialization fails frequently

Manjula_Ganesap
Contributor

With no change in code, i've noticed that my DLT initialization fails and then an automatic rerun succeeds. Can someone help me understand this behavior. Thank you.

Manjula_Ganesap_0-1694002699491.png

 

 

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @Manjula_GanesapThe behaviour you're observing is likely due to the way Databricks handles schema changes while running a DLT pipeline. If your pipeline reads data with Auto Loader and the schema of the input data changes while an update is running, the update is logged as CANCELED and automatically retried. This behaviour was introduced in version 3.60 of Databricks, released between November 30 and December 6, 2021. In previous versions, when the input schema changed, the update would be logged as FAILED, even though Databricks automatically retries the update. This could be why your DLT initialization fails but succeeds upon automatic rerun. 

Here is the relevant excerpt from the provided source:

"If your pipeline reads data with Auto Loader and the schema of the input data changes while an update is running, the update is logged as CANCELED and automatically retried. The new update is logged with the state SCHEMA_CHANGE. Previously, when the input schema changed, the update would be logged as FAILED even though automatically retries the update.

jose_gonzalez
Moderator
Moderator

which channel are you using for your DLT job?

Manjula_Ganesap
Contributor

@jose_gonzalez  - Missed to update the group on the fix. Reached out to Databricks to understand and it was identified that the threads call that i was making was causing the issue. After i removed it - i don't see it happening. 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.