Return set identifiers associated with a vector of keys. If a ts key does not exist in the catalog, set_id will be NA.

db_ts_get_dataset(con, ts_keys, schema = "timeseries")

Arguments

con

RPostgres connection object.

ts_keys

character vector of time series identifiers.

schema

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

Value

data.frame with columns `ts_key` and `set_id`

Examples


if (FALSE) {

# one key
db_ts_get_dataset(
  con = connection,
  ts_keys = "ch.zrh_airport.departure.total",
  schema = "schema"
)

# multiple keys
db_ts_get_dataset(
  con = connection,
  ts_keys = c(
    "ch.zrh_airport.departure.total",
    "ch.zrh_airport.arrival.total"
  ),
  schema = "schema"
)
}