Back to Starrocks

DROP FILE

docs/en/sql-reference/sql-statements/cluster-management/file/DROP_FILE.md

4.1.01.3 KB
Original Source

DROP FILE

Use the DROP FILE statement to delete a file. When you use this statement to delete a file, the file is deleted both in frontend (FE) memory and in Berkeley DB Java Edition (BDBJE).

:::tip

This operation requires the SYSTEM-level FILE privilege. You can follow the instructions in GRANT to grant this privilege.

:::

Syntax

SQL
DROP FILE "file_name" [FROM database]
[properties]

Parameters

ParameterRequiredDescription
file_nameYesThe name of the file.
databaseNoThe database to which a file belongs.
propertiesYesThe properties of the file. The following table describes the configuration items of properties.

Configuration items of properties

Configuration itemsRequiredDescription
catalogYesThe category to which a file belongs.

Examples

Delete a file named ca.pem.

SQL
DROP FILE "ca.pem" properties("catalog" = "kafka");