snowflake.snowpark.FileOperation.remove¶
- FileOperation.remove(stage_location: str, *, pattern: Optional[str] = None, statement_params: Optional[Dict[str, str]] = None) List[str][source]¶
Removes files from a stage.
References: Snowflake REMOVE command.
Example:
- Parameters:
stage_location – The stage and path where you want to remove files.
pattern – Specifies a regular expression pattern for filtering files to remove. The command lists all files in the specified path and applies the regular expression pattern on each of the files found. Default:
None(all files in the specified stage path are removed).statement_params – Dictionary of statement level parameters to be set while executing this action.
- Returns:
A
listof removed file paths.