Skip to main content

REMOVE STAGE FILES

Removes files from a stage.

See also:

  • LIST STAGE FILES: Lists files in a stage.
  • PRESIGN: Databend recommends using the Presigned URL method to upload files to the stage.

Syntax

REMOVE { userStage | internalStage | externalStage } [ PATTERN = '<regex_pattern>' ]

Where:

internalStage

internalStage ::= @<internal_stage_name>[/<file>]

externalStage

externalStage ::= @<external_stage_name>[/<file>]

PATTERN = 'regex_pattern'

A regular expression pattern string, enclosed in single quotes, filters files to remove by their filename.

Examples

This command removes all the files with a name matching the pattern 'ontime.' from the stage named playground*:

REMOVE @playground PATTERN = 'ontime.*'
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today