Skip to contents

This function succeeds silently on unvintaged target data tables provided the user requests the latest available data. Otherwise, it raises an error when the data set is not vintaged. It is designed to work either with concrete dataframes or with the lazy API Arrow datasets returned by hubData::connect_target_timeseries() and hubData::connect_target_oracle_output(). In the arrow case, it will not execute the query (i.e. you must still call dplyr::collect() or similar to instantiate the results.

Usage

hub_target_data_as_of(hub_target_data, as_of = "latest", .drop = TRUE)

Arguments

hub_target_data

Table of hub target data to filter

as_of

As of date to filter to, as an object coercible by as.Date(), or "latest" to filter to the most recent available vintage. Default "latest".

.drop

Drop the as_of column once the dataset has been filtered to a specific vintage? Default TRUE.

Value

The specific requested vintage of target data, potentially with the as_of column removed.