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: 

Default delta log retention interval is different than in documentation?

442027
New Contributor II

It notes in the documentation here that the default delta log retention interval is 30 days - however when I create checkpoints in the delta log to trigger the cleanup - historical records from 30 days aren't removed; i.e. current day checkpoint is at 2023-07-06 and historical records from 2023-04-27 are still remaining.

It's not until I specifically set:

```

ALTER TABLE <table> SET TBLPROPERTIES('delta.logRetentionDuration' = 'interval 30 days')
```
that after creating checkpoints those records from 2023-04-27 are removed as expected. Is there a different default log retention date than what is mentioned here? Or some other hidden process that I am missing?
1 REPLY 1

jose_gonzalez
Databricks Employee
Databricks Employee

you need to set SET TBLPROPERTIES ('delta.checkpointRetentionDuration' = '30 days',)

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