Reads one or more RDS objects from the Gradient datalake (AWS S3) by filtering on entity, project, and tag metadata.
Usage
dl_read(
entity = NULL,
...,
repair_conflicts = FALSE,
return_type = c("single", "bind", "auto", "tibble", "list"),
verbose = TRUE,
project = dl_get_project(),
env = "prod"
)Arguments
- entity
Optional character vector of entities to read (e.g.
"data/srv_main"). IfNULL, reads from all entities.- ...
Named tag arguments (
tag = value).waveA character vector specifying the waves to filter on.typeA character vector specifying the types to filter on.nameA character vector specifying the names to filter on.versionA character vector specifying the versions to filter on.batchA character vector specifying the batches to filter on.sourceA character vector specifying the sources to filter on.
- repair_conflicts
Logical. If
TRUE, attempts to coerce conflicting column types to character when binding. DefaultFALSE.- return_type
One of
"single","bind","auto","tibble", or"list".- verbose
Logical. If
TRUE, prints progress messages. DefaultTRUE.- project
Character scalar defining the project name. If
NULL, inferred from DESCRIPTION file (Namefield).- env
Datalake environment (
"prod"or"test"). Default"prod".
Value
Depending on return_type:
"single"-> one object or error if none/multiple found"bind"-> bound tibble of all objects (must be data frames)"tibble"-> tibble with metadata and columnx(each object)"list"-> named list of objects by key"auto"-> tries to pick best: single, bind, or tibble
Examples
if (FALSE) { # \dontrun{
dl_read(entity = "data/srv_main", project = "g6tr.dl", env = "test")
dl_read(entity = c("data/srv_main", "models/maxdiff"), type = "clean", env = "test")
} # }