Skip to contents

The manifest written by lnk_scenario_export() is the only index of a published tree: the bucket is not listable, so readers go through it. Each part's Hive fields (config, species, code) come from its key, the one place they are written, and its href resolves relative to the manifest.

Usage

lnk_catalog(manifest)

Arguments

manifest

Path or URL of manifest.json.

Value

A data frame, one row per part: dataset, config, species, code, drainage, wsgs, key, href, rows, bytes, md5, and version_id (the S3 object version a publish recorded, NA in a tree built locally or published before link#334; lnk_db_load() fetches that version, so a reader pinned to a manifest reads the parts it lists). Attributes: manifest (where it was read), id, built, provenance, datasets (each dataset's column contract as the export wrote it), configs (per config: the log rows of each build, config hashes, the builds' tokens, discharge, bundles) and files (the provenance and bundle files).

Details

manifest may be a local path, an https:// URL (an anonymous read, for a public prefix) or an s3:// URL. An s3:// read goes through the aws command line with the caller's credentials, which a private prefix needs: habitat/ is staged private (link#308).

Examples

if (FALSE) { # \dontrun{
cat <- lnk_catalog("s3://fresh-bc/habitat/fwa/v1/manifest.json")
table(cat$config, cat$species)

# which builds produced the default config's parts?
runs <- attr(cat, "configs")[[1]]$runs
vapply(runs, function(r) r$run_id, character(1))
} # }