Read specific version of a time series given time series key (unique identifier) and validity. By default, this function returns the most recent version of a time series.
db_ts_read(
con,
ts_keys,
valid_on = NULL,
regex = FALSE,
respect_release_date = FALSE,
schema = "timeseries",
chunksize = 10000
)
RPostgres connection object.
character vector of time series identifiers.
character representation of a date in the form of 'YYYY-MM-DD'. valid_on selects the version of a time series that is valid at the specified time.
boolean indicating if ts_keys should be interpreted as a regular expression pattern. Defaults to FALSE.
boolean indicating if it should the release embargo of a time series be respected. Defaults to FALSE. This option makes sense when the function is used in an API. In that sense, users do not have direct access to this function and therefore cannot simply switch parameters.
character name of the database schema. Defaults to 'timeseries'
set a limit of the number of time series requested in the function.
list of time series. List elements vary depending on nature of time series, i.e., regular vs. irregular time series.
Other time series functions:
db_collection_read_ts()
,
db_dataset_read_ts()
,
db_ts_delete_latest_version()
,
db_ts_delete()
,
db_ts_get_last_update()
,
db_ts_read_history()
,
db_ts_store()
,
db_ts_trim_history()
if (FALSE) {
db_ts_store(con = connection, zrh_airport, schema = "schema")
db_ts_read(con = connection, ts_keys = "ch.zrh_airport.departure.total", schema = "schema")
}