a month ago
Hi,
I'm trying to do the vacuum on a Delta table within a unity catalog. The default retention is 7 days. Though I vacuum the table, I'm able to see the history beyond 7 days. Tried restarting the cluster but still not working. What would be the fix ?
4 weeks ago
Hi @Kavi_007 , Vacuum only deletes stale files i.e. the files that are not being tracked by delta log. If you perform a delete operation, then the files will become stale and will be cleared after 7 days. From the delta history of your table, I do not see any delete operation. So, vacuum will not delete any file.
a month ago
Hi @Kavi_007,
VACUUM
command is indeed running on the correct table.a month ago - last edited a month ago
Yes, below are the commands.
History of the table:
4 weeks ago
@Kaniz - Could you please check this?
4 weeks ago
Hi @Kavi_007 , Vacuum only deletes stale files i.e. the files that are not being tracked by delta log. If you perform a delete operation, then the files will become stale and will be cleared after 7 days. From the delta history of your table, I do not see any delete operation. So, vacuum will not delete any file.
4 weeks ago
@Lakshay - you are right. I performed a couple of delete statements and then did VACCUM. It worked now. Thanks for your help !
4 weeks ago
Happy to help!
4 weeks ago
No, that's wrong. VACUUM removes all files from the table directory that are not managed by Delta, as well as data files that are no longer in the latest state of the transaction log for the table and are older than a retention threshold.
VACUUM - Azure Databricks - Databricks SQL | Microsoft Learn
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.