db_dataset_get_last_update: Get the dataset last update

View source: R/datasets.R

db_dataset_get_last_updateR Documentation

Get the dataset last update

Description

Get the dataset last update

Usage

db_dataset_get_last_update(con, set_id, schema = "timeseries")

Arguments

con

RPostgres connection object.

set_id

character name of the set to get the last update

schema

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

See Also

Other datasets functions: db_dataset_create(), db_dataset_delete(), db_dataset_get_keys(), db_dataset_list(), db_dataset_trim_history(), db_dataset_update_metadata(), db_ts_assign_dataset(), db_ts_get_dataset()

Examples


## Not run: 

# Storing different versions of the data, use parameter valid_from
# different versions are stored with the same key
ch.kof.barometer <- kof_ts["baro_2019m11"]
names(ch.kof.barometer) <- c("ch.kof.barometer")
db_ts_store(
  con = connection,
  ch.kof.barometer,
  valid_from = "2019-12-01",
  schema = "schema"
)

ch.kof.barometer <- kof_ts["baro_2019m12"]
names(ch.kof.barometer) <- c("ch.kof.barometer")
db_ts_store(
  con = connection,
  ch.kof.barometer,
  valid_from = "2020-01-01",
  schema = "schema"
)

db_dataset_create(
  con = connection,
  set_name = "barometer",
  set_description = "KOF Barometer",
  schema = "schema"
)

db_ts_assign_dataset(
  con = connection,
  ts_keys = "ch.kof.barometer",
  set_name = "barometer",
  schema = "schema"
)

db_dataset_get_last_update(
  con = connection,
  set_id = "barometer",
  schema = "schema"
)

## End(Not run)

timeseriesdb documentation built on March 24, 2022, 1:06 a.m.