Skip to main content
Version: Stable-3.1

CANCEL LOAD

Description

Cancels a given load job: Broker Load, Spark Load, or INSERT. A load job in the PREPARED, CANCELLED or FINISHED state cannot be canceled.

Canceling a load job is an asynchronous process. You can use the SHOW LOAD statement to check whether a load job is successfully canceled. The load job is successfully canceled if the value of State is CANCELLED and the value of type (displayed in ErrorMsg) is USER_CANCEL.

Syntax

CANCEL LOAD
[FROM db_name]
WHERE LABEL = "label_name"

Parameters

ParameterRequiredDescription
db_nameNoThe name of the database to which the load job belongs. If this parameter is not specified, a load job in your current database is canceled by default.
label_nameYesThe label of the load job.

Examples

Example 1: Cancel the load job whose label is example_label in the current database.

CANCEL LOAD
WHERE LABEL = "example_label";

Example 2: Cancel the load job whose label is example_label in the example_db database.

CANCEL LOAD
FROM example_db
WHERE LABEL = "example_label";