Learn R Programming

dataversionr (version 0.9.0)

commit_diff: Commit diff

Description

Write a diff to a versioned dataset destination. Check that it was written correctly, otherwise return an error.

Usage

commit_diff(diff_df, destination, verbose = FALSE)

Value

TRUE

Arguments

diff_df

a data frame. Output off diffdfs::diffdfs.

destination

a local directory path or an arrow SubTreeFileSystem

verbose

TRUE /FALSE should the function be chatty?

Examples

Run this code
temp_dir <- tempfile()
dir.create(temp_dir, recursive = TRUE)
df <- data.frame(a = 1:5, b = letters[1:5])
new_df <- data.frame(a = 2:5, b = letters[2:5])
diff <- diffdfs::diffdfs(new_df, df)

commit_diff(diff, temp_dir)

unlink(temp_dir)

Run the code above in your browser using DataLab