Moves a Parquet file into an archive subdirectory, appending a timestamp
suffix derived from the file's last_modified metadata. The archived
filename takes the form <table>_<YYYYMMDDTHHMMSSz>.parquet.
Usage
pq_archive(
table_name = NULL,
schema = NULL,
data_dir = NULL,
file_name = NULL,
archive_dir = "archive"
)Arguments
- table_name
Name of the table. Required if
file_nameis not provided.- schema
Schema name. Required if
file_nameis not provided.- data_dir
Root directory of the Parquet data repository. Defaults to the
DATA_DIRenvironment variable, with interactive setup when needed.- file_name
Full path to the Parquet file to archive. If provided,
table_name,schema, anddata_dirare ignored.- archive_dir
Name of the archive subdirectory relative to the schema directory. Defaults to
"archive".