write_using: Write an object to S3 using a function

View source: R/write.R

write_usingR Documentation

Write an object to S3 using a function

Description

Write an object to S3 using a function

Usage

write_using(x, f, s3_path, overwrite = FALSE, multipart = TRUE, ...)

Arguments

x

A local object, such as a dataframe

f

A function of the form f(object, path, ...) where object is the type of x and path is a filename

s3_path

A character string containing the full path to where the file should be stored in S3, including any directory names and the bucket name.

overwrite

A logical indicating whether to overwrite the file if it already exists.

multipart

A logical indicating whether to use multipart uploads. See http://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html. If the file specified by local_file_path is less than 100 MB, this is ignored.

Value

Returns nothing

Examples

write_using(my_dataframe, readr::write_csv, "alpha-everyone/delete/my_csv.csv")
write_using(my_dataframe, feather::write_feather, "alpha-everyone/delete/my_feather.feather")

moj-analytical-services/Rs3tools documentation built on Aug. 9, 2024, 1:27 a.m.