Export a DuckDB-backed lazy table to Parquet via COPY
Source:R/duckdb_to_parquet.R
duckdb_to_parquet.RdWrites the result of a DuckDB query (or table) to a Parquet file using
DuckDB's COPY (SELECT ...) TO ... (FORMAT PARQUET) and returns a dbplyr
table that reads the written Parquet file.
Arguments
- data
A DuckDB-backed dbplyr table / lazy query (e.g., a
tbl_duckdb_connection).- name
File stem (used to create
{name}.parquet).- schema
Subdirectory within
data_dirto write to (can be"").- data_dir
Base directory of your data repository. If
NULL, usesSys.getenv("DATA_DIR").- overwrite
Logical; overwrite existing Parquet file?