Spark Session - Get Spark Statement
Gets a single statement within a spark session.
GET {endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}/sessions/{sessionId}/statements/{statementId}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
The workspace development endpoint, for example |
|
livy
|
path | True |
string |
Valid api-version for the request. |
|
session
|
path | True |
integer (int32) |
Identifier for the session. |
|
spark
|
path | True |
string |
Name of the spark pool. |
|
statement
|
path | True |
integer (int32) |
Identifier for the statement. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success |
Examples
Gets a single statement within a spark session.
Sample request
GET myWorkspace.dev.azuresynapse.net/livyApi/versions/2020-12-01/sparkPools/mySparkPool/sessions/123/statements/123
Sample response
{
"id": 123,
"code": "fill in here",
"state": "fill in here",
"output": null
}
Definitions
| Name | Description |
|---|---|
|
Livy |
|
|
Spark |
|
|
Spark |
LivyStatementStates
| Value | Description |
|---|---|
| waiting | |
| running | |
| available | |
| error | |
| cancelling | |
| cancelled |
SparkStatement
| Name | Type | Description |
|---|---|---|
| code |
string |
|
| id |
integer (int32) |
|
| output | ||
| state |
SparkStatementOutput
| Name | Type | Description |
|---|---|---|
| data |
object |
|
| ename |
string |
|
| evalue |
string |
|
| execution_count |
integer (int32) |
|
| status |
string |
|
| traceback |
string[] |