You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: clarify vacuum command documentation for DeltaTable (delta-io#4196)
# Description
Improve documentation for vacuum command and specifically for
**full=False** case.
# Related Issue(s)
Related to this discussion:
delta-io#3644
# Documentation
Updated
Signed-off-by: khalidmammadov <khalidmammadov9@gmail.com>
Copy file name to clipboardExpand all lines: python/deltalake/table.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -554,15 +554,18 @@ def vacuum(
554
554
keep_versions: list[int] |None=None,
555
555
) ->list[str]:
556
556
"""
557
-
Run the Vacuum command on the Delta Table: list and delete files no longer referenced by the Delta table and are older than the retention threshold.
557
+
Run the Vacuum command on the Delta Table: list and delete files no longer referenced by the Delta table.
558
+
Here "not referenced" means all removed files (from vacuum/delete/update/merge) older than the retention threshold,
559
+
plus any files not mentioned in the logs (unless they start with underscore).
558
560
559
561
Args:
560
562
retention_hours: the retention threshold in hours, if none then the value from `delta.deletedFileRetentionDuration` is used or default of 1 week otherwise.
561
563
dry_run: when activated, list only the files, delete otherwise
562
564
enforce_retention_duration: when disabled, accepts retention hours smaller than the value from `delta.deletedFileRetentionDuration`.
563
565
post_commithook_properties: properties for the post commit hook. If None, default values are used.
564
566
commit_properties: properties of the transaction commit. If None, default values are used.
565
-
full: when set to True, will perform a "full" vacuum and remove all files not referenced in the transaction log
567
+
full: when set to True, will perform a "full" vacuum and remove all files not referenced the transaction log.
568
+
when False, it will only vacuum not referenced files since last log checkpoint (or since genesis if no checkpoint exists).
566
569
keep_versions: An optional list of versions to keep. If provided, files from these versions will not be deleted.
567
570
Returns:
568
571
the list of files no longer referenced by the Delta Table and are older than the retention threshold.
0 commit comments