write_release: write_release

View source: R/write_release.R

write_releaseR Documentation

write_release

Description

Release data set with identifier — ECONDATA:id(version). Moves the staged dataset to a vintage.

Usage

write_release(id, version, description, method = "release", ...)

Arguments

id

character. Data identifier.

version

character. Version of the data definition.

description

character. Description of the vintage. This focuses on the reference period, and may additionally have the publication date (not time) in brackets.

method

One of release, reset, or rollback. release releases staged data, reset wipes staged data, and rollback wipes the previous release.

...

Further optional arguments:

agencyid character. Defaults to "ECONDATA". Agency responsible for the metadata creation/maintenance.
release timestamp. Date & time of publication by the data provider. For historical releases, with format %Y-%m-%dT%H:%M:%S. Defaults to format(Sys.time(), "%Y-%m-%dT%H:%M:%S", tz = "Africa/Johannesburg").

Details

An EconData account is required to use this function. The user must provide an API token, which can be found on the Account page of the online portal. A GUI dialog will prompt the user for their API token. Credentials can also be supplied by setting the ECONDATA_CREDENTIALS environment variable using the syntax: "client_id;client_secret", e.g. Sys.setenv(ECONDATA_CREDENTIALS="client_id;client_secret"), when available.

The functionality provided by write_release is to release, reset, or rollback a release/vintage of the data set according to the function arguments. As this makes modifications to the database, the user calling this function requires higher privileges than needed for other econdatar functions—the user requires membership with the relevant data provider.

Value

No return value, called for side-effects—writes data to server.

See Also

read_release write_econdata

Examples

## Not run: 
write_release(id = "BA900",
              version = "1.0.0",
              description = paste0("Vintage - ", Sys.Date()))

write_release(id = "RETAIL",
              version = "1.1.0",
              description = "Aug 2024 (2024-10-16)",
              release = "2024-10-16T14:30:00")

## End(Not run)

coderaanalytics/econdatar documentation built on Feb. 19, 2025, 10:37 p.m.