Skip to main content
Glama

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" )

if result.get("state") == "available": output = result.get("output", {}) print(f"Status: {output.get('status')}") print(f"Result: {output.get('data', {}).get('text/plain')}") ```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
lakehouse_idYes
session_idYes
statement_idYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bablulawrence/ms-fabric-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server