livy_get_statement_status
Check the execution status and retrieve output of a Livy statement in Microsoft Fabric. Monitor statement progress and access results when available.
Instructions
Get the current status and output of a Livy statement.
Retrieves the status, output, and execution details of a statement. Use this for manual status checking without auto-polling.
Statement States:
'waiting': Statement is queued for execution
'running': Statement is currently executing
'available': Statement completed successfully
'error': Statement encountered an error
'cancelling': Statement is being cancelled
'cancelled': Statement was cancelled
Parameters: workspace_id: Fabric workspace ID. lakehouse_id: Fabric lakehouse ID. session_id: Livy session ID. statement_id: Statement ID to check.
Returns: Dictionary with statement status including id, state, output, and code. Output field contains execution results when state is 'available'.
Example: ```python result = livy_get_statement_status( 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 |