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

View source: R/io.R

save_dt_folderR Documentation

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

Description

The variables are automatically found from glue strings in URL

Usage

save_dt_folder(
  dt,
  file,
  threads = parallel::detectCores(),
  compress_level = 9L,
  quiet = FALSE
)

Arguments

dt

a data.table

quiet

logical turn off output messages, default to FALSE

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

...

additional arguments passed to aws.s3::put_object

Examples

## Not run: 
save_dt_folder(dt, "dir1/obj_{date}.rds")

## End(Not run)


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