`db_ts_assign_dataset` returns a list with status information. status `"ok"` means all went well. status `"warning"` means some keys are not in the catalog. The vector of those keys is in the `offending_keys` field.

db_ts_assign_dataset(con, ts_keys, set_name, schema = "timeseries")

Arguments

con

RPostgres connection object.

ts_keys

character vector of time series identifiers.

set_name

character name of a dataset.

schema

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

Value

list A status list

Details

Trying to assign keys to a non-existent dataset is an error.

Examples


if (FALSE) {

db_dataset_create(
  con = connection,
  set_name = "zrh_airport_data",
  set_description = "Zurich airport arrivals and departures ",
  schema = "schema"
)

db_ts_assign_dataset(
  con = connection,
  ts_keys = c(
    "ch.zrh_airport.departure.total",
    "ch.zrh_airport.arrival.total"
  ),
  set_name = "zrh_airport_data",
  schema = "schema"
)
}