files.parquet.pq_remove
files.parquet.pq_remove(
table_name=None,
schema=None,
data_dir=None,
file_name=None,
archive=False,
archive_dir='archive',
)Remove a parquet file from active or archive storage.
For workflow-oriented examples, see Parquet Utilities Examples.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| table_name | str | Basename of the parquet file to remove when resolving the source file from schema and data_dir. |
None |
| schema | str | Name of the parquet schema directory used when resolving the source file from table_name. |
None |
| data_dir | str | Root directory of the parquet data repository. If omitted, defaults to DATA_DIR or the current working directory. |
None |
| file_name | str or path - like | Exact parquet file path to remove. If supplied, table_name and schema are ignored. |
None |
| archive | bool | If True, resolved files are looked up under archive_dir. |
False |
| archive_dir | str | Name of the archive directory under the schema directory. Defaults to "archive". |
'archive' |
Returns
| Name | Type | Description |
|---|---|---|
| str or None | Removed file path as a string, or None if nothing was removed. |
Examples
>>> pq_remove(table_name="company", schema="comp")
>>> pq_remove(table_name="company_20240614T062835Z", schema="comp", archive=True)