A way out to an open, stable format. DuckDB reads its own files back a long way, but Parquet is the safer bet for something that has to be readable in ten years by software nobody has written yet, and it is what a repository will expect alongside a publication.
Arguments
- db
A
nadia_dbfromread_nadia(), or the path to a file.- dir
Directory to write to; created if it does not exist.
- views
Export the reconstructed canonical tables (
TRUE, the default) or the underlying storage tables (FALSE).- verbose
Print progress.
Examples
if (requireNamespace("duckdb", quietly = TRUE) &&
requireNamespace("arrow", quietly = TRUE)) {
data(nadia_dia)
f <- file.path(tempdir(), "export.nadia")
write_nadia(f, nadia_dia, verbose = FALSE)
out <- file.path(tempdir(), "nadia_parquet_export")
nadia_export_parquet(f, out, verbose = FALSE)
list.files(out)
unlink(c(f, out), recursive = TRUE)
}