Skip to content

Commit 4ac9f71

Browse files
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>
1 parent ef405d8 commit 4ac9f71

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

python/deltalake/table.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,15 +554,18 @@ def vacuum(
554554
keep_versions: list[int] | None = None,
555555
) -> list[str]:
556556
"""
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).
558560
559561
Args:
560562
retention_hours: the retention threshold in hours, if none then the value from `delta.deletedFileRetentionDuration` is used or default of 1 week otherwise.
561563
dry_run: when activated, list only the files, delete otherwise
562564
enforce_retention_duration: when disabled, accepts retention hours smaller than the value from `delta.deletedFileRetentionDuration`.
563565
post_commithook_properties: properties for the post commit hook. If None, default values are used.
564566
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).
566569
keep_versions: An optional list of versions to keep. If provided, files from these versions will not be deleted.
567570
Returns:
568571
the list of files no longer referenced by the Delta Table and are older than the retention threshold.

0 commit comments

Comments
 (0)