Skip to contents

Lists all objects for a given project and entity within the Gradient datalake (AWS S3). Extracts tags from object keys (e.g. wave=a/type=raw/.rds) and returns them as tidy columns. Supports multi-tag filtering, multi-entity queries, and cross-project listing.

Usage

dl_ls(
  entity = NULL,
  ...,
  layer = NULL,
  verbose = FALSE,
  strict = FALSE,
  project = dl_get_project(),
  env = "prod"
)

Arguments

entity

Optional character vector defining one or more entities (e.g. "data/srv_main"). If NULL, lists all entities.

...

Named tag arguments (tag = value).

  • wave A character vector specifying the waves to filter on.

  • type A character vector specifying the types to filter on.

  • name A character vector specifying the names to filter on.

  • version A character vector specifying the versions to filter on.

  • batch A character vector specifying the batches to filter on.

  • source A character vector specifying the sources to filter on.

layer

Optional character vector of layers (e.g. "data", "models"). If NULL, includes all layers.

verbose

Logical. If TRUE, prints informational messages. Default is TRUE.

strict

Logical. If TRUE, the function enforces strict tag filtering: any tag column present in the entity but not explicitly provided in ... (or provided as NULL) is treated as NA_character_, meaning that only objects where that tag is missing or NA will be returned. When FALSE (default), unspecified or NULL tags are ignored and do not affect filtering.

project

Character scalar or vector defining one or more projects. If omitted, inferred from DESCRIPTION. If NULL, lists across all projects.

env

Environment of the datalake to use ("prod" or "test"). Defaults to "prod". "prod" = g6tr-dl, "test" = g6tr-dl-test.

Value

A tibble of class dl_ls with metadata and extracted tags.

Examples

if (FALSE) { # \dontrun{
# Default: current project
dl_ls(entity = "data/srv_main", env = "test")

# Multiple entities
dl_ls(entity = c("data/srv_main", "models/maxdiff"), env = "test")

# Multiple projects
dl_ls(project = c("bastion", "g6tr.dl"), env = "test")

# All projects
dl_ls(project = NULL, env = "test")
} # }