Save Data to Parquet
save_parquet.RdSaves data directly from the database to a Parquet file using DuckDB's native COPY command. This is much faster than reading into R first and creates smaller files for easy sharing. Uses the data table name stored in the connection attributes if available.
Arguments
- conn
A DuckDB connection object.
- file_path
Character string specifying the output file path. Default is "redcap.parquet".
- table_name
Character string specifying the source table name. If NULL, uses the table name stored in connection attributes. Default is NULL.
- query
Character string with custom SQL query to export. If provided, table_name is ignored.