Skip to contents

Reads a single RDS object from the datalake (S3) using paws library. Takes a one-row tibble from dl_ls() or dl_ls_versions() and returns either the object itself or that row augmented with metadata.

Usage

dl_read_ls_single(
  dl_ls_line,
  return_line = TRUE,
  include_tags = FALSE,
  verbose = TRUE,
  env = "prod"
)

Arguments

dl_ls_line

One-row tibble (output of dl_ls() or dl_ls_versions()).

return_line

If TRUE (default), returns the input row with added columns (x, note, nrow, len). If FALSE, returns only the object.

include_tags

Logical, if TRUE, extracts tags from the S3 key and includes them as packed columns in the returned object (if it's a data frame).

verbose

Logical, print progress messages. Default TRUE.

env

Datalake environment ("prod" or "test"). Default "prod".

Value

One-row tibble (default) or loaded object.

Examples

if (FALSE) { # \dontrun{
dl_ls_line <- dl_ls(entity = "data/srv_main", env = "test") |> slice(1)
res <- dl_read_ls_single(dl_ls_line, env = "test")
obj <- dl_read_ls_single(dl_ls_line, return_line = FALSE, env = "test", include_tags = TRUE)
} # }