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. 

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!