Skip to content
Framework

Data

push_data_registry()

Push a Project's Data Registry to Framework Cloud

Sends the project's data catalog (the data section of its settings) to its data registry on Framework Cloud. The entries go to POST /api/v1/projects/data, first as a dry run whose changes are listed with a warning: new copies of the project, zips, and Update on GitHub use what is pushed. Then it asks Push these changes? [y/n]. Entries only on Cloud stay there unless remove = TRUE.

Usage

push_data_registry(
  project_path = ".",
  remove = FALSE,
  force = FALSE,
  confirm = NULL,
  dry_run = FALSE
)

Arguments

Name Default Description
project_path "."

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

remove FALSE

Remove entries from Cloud's registry that this project doesn't have.

force FALSE

Push even when Cloud's registry changed since the last pull.

confirm NULL

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

dry_run FALSE

List the changes and send nothing.

Value

Invisibly, a list: revision, changes (Cloud's added, changed, removed, and kept), applied, dry_run, and message.

Details

Only the definitions move: each entry's name, path, type, delimiter, locked and private flags, description, and Stata names. Data files are never uploaded, and file hashes stay in the project's framework.db.

When Cloud's registry changed since this project last pulled it (the revision in .framework/data.lock.json), the push is refused with "Pull first"; force = TRUE replaces Cloud's newer changes. A push resolves the project again from its blueprint's latest version.

Examples

Not run

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

Related reference

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