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

Delta Log checkpoints not being created?

442027
New Contributor II

It is mentioned in the delta protocol that checkpoints for delta tables are created every 10 commits - however when I modify a table after >10 separate operations (producing >10 separate json files in the _delta_log directory), no checkpoint files are created. Are there specific conditions under which checkpoint files are created (and not just every 10 commits); i.e. certain operations, data size, etc.?

My concern is that if checkpoints aren't created, then delta logs aren't cleaned up, and if that happens does that mean the metadata for my tables will grow infinitely large over time?

The delta tables I created were done by executing (where the storage location is s3):

```

df.write.format("delta").saveAsTable(name="<table>", path="<s3_path>", mode="overwrite", overwriteSchema=True)

```

 

1 ACCEPTED SOLUTION

Accepted Solutions

Vinay_M_R
Valued Contributor II
Valued Contributor II

 

As the latest update now checkpointing of delta tables are created for every 100 commits. This is done for some improvement purpose.

If you want to have a checkpoint file for delta table for every 10 commits or after any desired commits. You can customize it using below configuration:

"delta.checkpointInterval" 

Syntax:

alter table <table_name> SET TBLPROPERTIES ("delta.checkpointInterval" = "10")

you can set the desired checkpointing interval and you need to alter the table with this and set the checkpoint interval under set table properties shown as above "delta.checkpointInterval" = "10" 

View solution in original post

2 REPLIES 2

Vinay_M_R
Valued Contributor II
Valued Contributor II

 

As the latest update now checkpointing of delta tables are created for every 100 commits. This is done for some improvement purpose.

If you want to have a checkpoint file for delta table for every 10 commits or after any desired commits. You can customize it using below configuration:

"delta.checkpointInterval" 

Syntax:

alter table <table_name> SET TBLPROPERTIES ("delta.checkpointInterval" = "10")

you can set the desired checkpointing interval and you need to alter the table with this and set the checkpoint interval under set table properties shown as above "delta.checkpointInterval" = "10" 

442027
New Contributor II

Tested and confirmed that it's every 100 commits by default. Thanks that makes a lot of sense!

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.