Skip to content
Framework

Data

pull_data_registry()

Pull a Project's Data Registry from Framework Cloud

Brings the project's data catalog (the data section of its settings) up to date with its data registry on Framework Cloud. The registry is read with the project token (GET /api/v1/projects/data), and the changes are listed first: entries to add, entries whose path, type, or options differ, and entries only in this project. Then it asks Apply these changes? [y/n].

Usage

pull_data_registry(
  project_path = ".",
  overwrite = FALSE,
  confirm = NULL,
  dry_run = FALSE
)

Arguments

Name Default Description
project_path "."

Path to the project directory (default: current directory).

overwrite FALSE

Use Cloud's definitions for entries that differ.

confirm NULL

TRUE applies without asking; FALSE cancels. NULL asks in a console and stops otherwise.

dry_run FALSE

List the changes and write nothing.

Value

Invisibly, a list: revision, entries (added, changed, differ_kept, and kept_local, as names), applied, dry_run, and message.

Details

Only the definitions move. Data files are never downloaded, and file hashes stay in the project's framework.db. Applying writes the new entries into the settings' data section (inline, or in its split file such as settings/data.yml), rewriting only that block. Local entries are never removed, and an entry whose local definition differs keeps it unless overwrite = TRUE. Fields Framework Cloud doesn't keep stay as they are. The revision pulled is kept in .framework/data.lock.json for push_data_registry().

Examples

Not run

if (FALSE) {
pull_data_registry(dry_run = TRUE)
pull_data_registry()
}

Related reference

Search guides and reference for R, Python, Stata, the CLI, and Framework Cloud.