Closed jordansread closed 8 years ago
sounds good. ideally/eventually we'd also have some way to retrieve an archived version in get_ts, maybe even by passing in a date range rather than a specific date stamp? updating all the data on SB can take several days, or at least did in the first go-round. probably worth at least considering when deciding on a naming scheme for archived files.
adding
make_archive_name(basename(files[i]))
[1] "ARCHIVE_20160324_nwis_05406479-ts_doobs_nwis.tsv.gz"
but I wonder if the actual date stamp used should be the date it was originally posted, not the date it was archived? Not sure.
currently,
pkg.env$archive_id <- format(Sys.Date(),'%Y%m%d_')
i agree with using the original posting date if possible.
otherwise, naming scheme looks good to me. are you writing a parse_archive_name
fun at the same time?
yep, will do a parse_archive too
:+1:
For post_ts(on_exists="archive") we need to use the file rename of the old file, and post a new one:
https://github.com/USGS-R/sbtools/issues/188
Probably use an
archive
name and a date stamp for the old file?