if (FALSE) { # requireNamespace("RSQLite", quietly = TRUE)
conn <- get_connection()
data <- dplyr::copy_to(conn, mtcars)
# Copy the first 3 records
update_snapshot(
head(data, 3),
conn = conn,
db_table = "test.mtcars",
timestamp = Sys.time()
)
# Update with the first 5 records
update_snapshot(
head(data, 5),
conn = conn,
db_table = "test.mtcars",
timestamp = Sys.time()
)
dplyr::tbl(conn, "test.mtcars")
close_connection(conn)
}
Run the code above in your browser using DataLab