Read all Time Series in a User Collection

db_collection_read_ts(
  con,
  collection_name,
  collection_owner,
  valid_on = NULL,
  respect_release_date = FALSE,
  schema = "timeseries",
  chunksize = 10000
)

Arguments

con

RPostgres connection object.

collection_name

character name of a collection to read. Collection are bookmark lists that contain time series keys.

collection_owner

character username that is the owner of a collection.

valid_on

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.

respect_release_date

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.

schema

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

chunksize

set a limit of the number of time series requested in the function.

Details

Collections are identified by their name and owner. Several collections with the same name but different owners may exist, therefore both need to be supplied in order to uniquely identify a collection.

Examples


if (FALSE) {

db_ts_store(con = connection, zrh_airport, schema = "schema")
db_ts_store(con = connection, kof_ts, schema = "schema")

db_collection_add_ts(
  con = connection,
  collection_name = "barometer and departures zurich",
  ts_keys = c(
    "ch.zrh_airport.departure.total",
    "ch.zrh_airport.departure.total",
    "ch.kof.barometer"
  ),
  schema = "schema"
)

db_collection_read_ts(
  con = connection,
  collection_name = "barometer and departures zurich",
  collection_owner = "user_name",
  schema = "schema"
)
}