📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

REMOVE STAGE FILES



Removes files from a stage.

See also:

  • LIST STAGE FILES: Lists files in a stage.
  • PRESIGN: TiDB Cloud Lake 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 staged files to remove. It matches the file path portion after @<stage_name>[/<path>]. See Filtering Staged Files with PATTERN.

Examples

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

REMOVE @playground PATTERN = 'ontime.*'

Was this page helpful?