Learn R Programming

timeseriesdb (version 1.0.0-1.1.2)

db_metadata_store: Store Time Series Metadata to PostgreSQL

Description

The most basic way to store meta information is to assign non-translated (unlocalized) descriptions, but it also can be stored in different languages (localized) using the parameter locale. See also basic usage.

Usage

db_metadata_store(
  con,
  metadata,
  valid_from,
  locale = NULL,
  on_conflict = "update",
  schema = "timeseries"
)

Arguments

con

RPostgres connection object.

metadata

object of class tsmeta that contains the metadata to be stored.

valid_from

character representation of a date in the form of 'YYYY-MM-DD'. It should always be explicitly specified.

locale

character indicating the language of the meta information to be store. We recommend to use ISO country codes to represent languages. Defaults to NULL. When local is set to NULL, metadata are stored without localization. Note that, when localizing meta information by assigning a language, multiple meta information objects can be stored for a single time series.

on_conflict

character either "update": add new fields and update existing ones or "overwrite": completely replace existing record.

schema

character name of the database schema. Defaults to 'timeseries'

Value

status list created from DB status return JSON.

See Also

Other metadata functions: db_collection_read_metadata(), db_dataset_read_metadata(), db_meta_get_latest_validity(), db_metadata_read()

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
sum("a")
# }

Run the code above in your browser using DataLab