Last chance! 50% off unlimited learning
Sale ends in
Delete backups after a particular position in a versioned dataset
delete_backup(destination, after_position, verbose = FALSE)
TRUE
a local directory path or an arrow SubTreeFileSystem
how many backups should we leave in the dv?
TRUE /FALSE should the function be chatty?
temp_dir <- tempfile()
dir.create(temp_dir, recursive = TRUE)
df <- data.frame(a = 1:5, b = letters[1:5])
for(i in 1:10) {put_backup(df, temp_dir)}
# before
list.files(file.path(temp_dir, "backup"))
delete_backup(temp_dir, 4L)
# after
list.files(file.path(temp_dir, "backup"))
Run the code above in your browser using DataLab