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: 

Deleting data programmatically from databricks live delta tables

aozero
New Contributor II

Hello all, 

I am relatively new in data engineering and working on a project requiring me to programmatically delete data from delta live tables. However, I found that simply stopping the streaming job and deleting rows from the delta tables caused the stream to fail once I restarted it. The only solution seems to create a new checkpoint for the stream to write to after the deletion or to delete all the entries in the parquet files. Are these the correct solutions to this problem? Which solution do people employ in such cases? Whenever I need to delete data, will I need to create a new checkpoint location or possibly parse billions of parquet records and delete their entries? 

Thanks !  

3 REPLIES 3

shan_chandra
Esteemed Contributor
Esteemed Contributor

aozero
New Contributor II

Hi @shan_chandra Full refreshing brings back the deleted data since it exists in the pubsub source. 

 

shan_chandra
Esteemed Contributor
Esteemed Contributor

@aozero - restart the pipeline with the new checkpoint. 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group