livy_cancel_statement
Cancel a running Livy statement while keeping the session active for new queries. This tool stops statements in 'waiting' or 'running' state without terminating the session.
Instructions
Cancel a running Livy statement without killing the session.
Cancels a statement that is currently 'waiting' or 'running'. The statement will transition to 'cancelling' then 'cancelled' state. The session remains available for new statements.
Note: Only works on statements in 'waiting' or 'running' state.
Parameters: workspace_id: Fabric workspace ID. lakehouse_id: Fabric lakehouse ID. session_id: Livy session ID. statement_id: Statement ID to cancel.
Returns: Dictionary with cancellation result (typically {"msg": "canceled"}).
Example:
python
result = livy_cancel_statement(
workspace_id="12345678-1234-1234-1234-123456789abc",
lakehouse_id="87654321-4321-4321-4321-210987654321",
session_id="0",
statement_id="1"
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| lakehouse_id | Yes | ||
| session_id | Yes | ||
| statement_id | Yes |