read_dv_diff: Read dv diff

View source: R/read_dv_diff.R

read_dv_diffR Documentation

Read dv diff

Description

Read a version of a versioned dataset into a data frame using just the stored diffs.

Usage

read_dv_diff(destination, as_of, key_cols)

Arguments

destination

a local directory path or an arrow SubTreeFileSystem

as_of

the valid date at which you'd like to read the dv

key_cols

a character vector of column names that constitute a unique key

Value

a data frame

Examples

temp_dir <- tempfile()
dir.create(temp_dir, recursive = TRUE)
df <- data.frame(a = 1:5, b = letters[1:5])
create_dv(df, temp_dir, diffed = TRUE)

read_dv_diff(temp_dir,
             as_of = lubridate::now(),
             key_cols = get_metadata(temp_dir)$key_cols)

unlink(temp_dir)


dataversionr documentation built on Aug. 18, 2022, 9:06 a.m.