# NOT RUN {
# }
# NOT RUN {
# Store different versions of the time series data
ch.kof.barometer <- kof_ts["baro_2019m11"]
names(ch.kof.barometer) <- c("ch.kof.barometer")
db_ts_store(
con = connection,
ch.kof.barometer,
valid_from = "2019-12-01",
schema = "schema"
)
ch.kof.barometer <- kof_ts["baro_2019m12"]
names(ch.kof.barometer) <- c("ch.kof.barometer")
db_ts_store(
con = connection,
ch.kof.barometer,
valid_from = "2020-01-01",
schema = "schema"
)
db_ts_trim_history(
con = connection,
ts_keys = "ch.kof.barometer",
older_than = "2019-12-31",
schema = "schema"
)
# }
Run the code above in your browser using DataLab