Cancel SQL statement action
- Updated: 2026/05/12
Cancels an active Databricks SQL statement using the specified session and SQL statement ID. The action uses the selected session (directly or via a variable) to connect to Databricks, identifies the target SQL statement, and stops its execution.
Settings
- Use the Session field to select
one of the following options:
- Session name: Enter the name of the session
used during Connect
action.
Click the Insert a value icon to select an existing variable that you have used to store the default session name.
- Variable: Enter the name of the variable that you have used to store the session name.
- Session name: Enter the name of the session
used during Connect
action.
- Specify the SQL statement ID of
the Databricks SQL statement that you want to
cancel.
Click the Insert a value icon to select an existing variable.
- Select a variable that you want to use to store the output from the
Assign the output to variable list.The output variable stores the final status of the SQL statement after the cancellation request is processed. The possible values are:
Cancelled— The cancellation request was accepted and the SQL statement was successfully stopped before completion.Succeeded— The SQL statement had already completed successfully before the cancellation request was processed. No cancellation occurred.Failed— The SQL statement encountered an error during execution and terminated before the cancellation request could take effect.Closed— The SQL statement was already closed or the session was terminated before the cancellation request was processed.