cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
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
Moderator
Moderator

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