Skip to content

Commit aa09be9

Browse files
author
Daniel Fischer
committed
fast insert append will now delete prefix
1 parent f6d2152 commit aa09be9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/append.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ rs_append_table = function(
7474
queryStmt(dbcon,paste0("set wlm_query_slot_count to ", wlm_slots));
7575
}
7676

77-
result = tryCatch({
77+
tryCatch({
7878
stageTable=s3ToRedshift(dbcon, table_name, bucket, prefix, region, access_key, secret_key, iam_role_arn,staging=F)
7979
}, error = function(e){
8080
stop("Failed to Load Data")
81+
},finally = {
82+
deletePrefix(prefix, bucket, split_files, access_key, secret_key, region)
8183
})
8284

8385
return (result)

0 commit comments

Comments
 (0)