Forum Discussion
Peter_23
10 months agoAdvocate V
vacuum mode dont work
Hi community, I try to understand vaccum in delta table, I have a table with this history. I ran the maintenance with 7 days from window commands. 🙂 I run the code in notebook. d...
- 10 months ago
Hi Peter_23,
We wanted to see if the information we gave helped fix your problem. If you need more help, please feel free to contact the Microsoft Fabric community.
Thank you.
AntoineW
10 months agoSuper User
Hello Peter_23,
Hope you are fine, this is a summary of VACUUM :
- VACUUM only deletes unused data files older than the retention period.
- It does not delete the Delta transaction log (the history/versions).
- You can still read versionAsOf=1 as long as the data files used by version 1 still exist—either because:
- they are newer than the 7‑day retention, or
- they’re still referenced by newer versions (e.g., you only appended new data and older files remain part of the latest snapshot).
So what you’re seeing—being able to spark.read versionAsOf=1 after a VACUUM RETAIN 7 DAYS—can be perfectly correct.
Some docs that can help you :
- https://learn.microsoft.com/en-us/azure/databricks/delta/vacuum
- https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-table-maintenance
Hope it can help you !
Best regards,
Antoine