`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")
RPostgres connection object.
character vector of time series identifiers.
character name of a dataset.
character name of the database schema. Defaults to 'timeseries'
list A status list
Trying to assign keys to a non-existent dataset is an error.
Other datasets functions:
db_dataset_create()
,
db_dataset_delete()
,
db_dataset_get_keys()
,
db_dataset_get_last_update()
,
db_dataset_list()
,
db_dataset_trim_history()
,
db_dataset_update_metadata()
,
db_ts_get_dataset()
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"
)
}