| dbc_to_parquet | R Documentation |
A high-level convenience wrapper that first writes the .dbc file to
a temporary CSV using the C engine, then converts that CSV into a
.parquet file using the arrow package. It therefore requires
temporary disk space for the CSV and is not an end-to-end streaming writer.
dbc_to_parquet(
input_file,
output_file,
batch_size = 8192L,
encoding = "CP850",
verbose = FALSE,
progress = NULL
)
input_file |
Character string. Path to the source |
output_file |
Character string. Path for the output |
batch_size |
Integer. Passed to |
encoding |
Character string. Source encoding of character fields.
Default |
verbose |
Logical. If |
progress |
Function or |
This is the recommended workflow for Big Data and epidemiological research, as Parquet files are heavily compressed, columnar, and preserve types.
TRUE invisibly on success. Stops if the arrow package
is not installed.
if (requireNamespace("arrow", quietly = TRUE)) {
dbc <- system.file("extdata", "sids.dbc", package = "dbcturbo")
parquet <- tempfile(fileext = ".parquet")
dbc_to_parquet(dbc, parquet)
arrow::read_parquet(parquet)
unlink(parquet)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.