s3_save_dt_folder: Save data.table to S3 folder split on specific variable(s)

View source: R/s3.R

s3_save_dt_folderR Documentation

Save data.table to S3 folder split on specific variable(s)

Description

The variables are automatically found from glue strings in URL

Usage

s3_save_dt_folder(
  dt,
  s3_url,
  conf = list(),
  args_save = list(),
  quiet = FALSE,
  ...
)

Arguments

dt

a data.table

s3_url

string S3 URL to save to. Needs to include the bucket and protocol (s3://bucket_name/) and one or several glue strings to be interpolated based on column names

conf

list with 'key', 'secret', 'region', and 'base_url' parameters. If missing, will look for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION in environment variables.

args_save

optional, additional arguments passed to save function

quiet

logical turn off output messages, default to FALSE

...

additional arguments passed to aws.s3::put_object

Examples

## Not run: 
s3_save_dt_folder(dt, "s3://hfty-test-bucket/obj_{date}.rds")

## End(Not run)


fcocquemas/hfty.helpers documentation built on Feb. 13, 2023, 7:25 a.m.