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.
db_metadata_store(
con,
metadata,
valid_from,
locale = NULL,
on_conflict = "update",
schema = "timeseries"
)
RPostgres connection object.
object of class tsmeta that contains the metadata to be stored.
character representation of a date in the form of 'YYYY-MM-DD'. It should always be explicitly specified.
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.
character either "update": add new fields and update existing ones or "overwrite": completely replace existing record.
character name of the database schema. Defaults to 'timeseries'
status list created from DB status return JSON.
Other metadata functions:
db_collection_read_metadata()
,
db_dataset_read_metadata()
,
db_meta_get_latest_validity()
,
db_metadata_read()
# NOT RUN {
# }
# NOT RUN {
sum("a")
# }
Run the code above in your browser using DataLab