Deletes a Parquet file. By default the active file (in the schema directory)
is removed. Set archive = TRUE to remove a file from the archive
subdirectory instead.
Usage
pq_remove(
table_name = NULL,
schema = NULL,
data_dir = NULL,
file_name = NULL,
archive = FALSE,
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 remove. If provided,
table_name,schema,data_dir, andarchiveare ignored.- archive
If
TRUE, resolve the file from the archive subdirectory rather than the active schema directory.- archive_dir
Name of the archive subdirectory relative to the schema directory. Defaults to
"archive".
Value
Invisibly returns the path of the removed file, or NULL if
the file was not found or could not be deleted.