# Get SQL Statement Result

> Get SQL Statement Result activity in the Databricks connector.

## Project compatibility

Windows | Cross-platform

## Overview

| Description | API Method | API Path |
| --- | --- | --- |
| Fetch the status and rows of a previously submitted Databricks SQL statement by statement_id. Poll until status.state is SUCCEEDED; other states are PENDING, RUNNING, FAILED, CANCELED and CLOSED. | GET | `/statements/{statement_id}` |

## Input

| Parameter | Description | Data Type |
| --- | --- | --- |
| Databricks SQL Statement ID \* | ID of the Databricks SQL statement to fetch, as returned by Execute a SQL Query. Example: 01f188bb-89a8-116e-821e-50548abbb768. | string |

\* Required parameter.

## Output

| Parameter | Description | Data Type |
| --- | --- | --- |
| SQL Statement | The SQL statement to execute. | string |
| Warehouse ID | ID of the SQL warehouse to run the statement on. | string |
| Catalog | Catalog used as the default for the statement. | string |
| Schema | Schema used as the default for the statement. | string |
| Wait Timeout | How long to wait synchronously, 0s or 5s-50s. | string |
| On Wait Timeout | CONTINUE returns a statement_id to poll; CANCEL aborts the statement. Allowed values: `CONTINUE`, `CANCEL`. | string |
| Row Limit | Maximum number of rows to return. | integer |
| Byte Limit | Maximum result size in bytes. | integer |
| Disposition | INLINE returns data in the response; EXTERNAL_LINKS returns presigned URLs. Allowed values: `INLINE`, `EXTERNAL_LINKS`. | string |
| Format | Result serialization format. Allowed values: `JSON_ARRAY`, `ARROW_STREAM`, `CSV`. | string |
| Parameters | Named parameter markers, for example [{"name":"p","value":"1","type":"INT"}]. | array |
| Statement ID | Server-assigned statement id; poll with Get Statement. | string |
| Status | Execution state: PENDING, RUNNING, SUCCEEDED, FAILED, CANCELED, CLOSED. | object |
| Manifest | Result schema, chunk layout and row counts. | object |
| Result | Result payload; row data is under result.data_array. | object |

:::note
You might see variations in the output depending on where you run the activity. In API workflows and Maestro Flow, a single response object containing all the fields is returned. In RPA workflows, not all fields are exposed, but you can still retrieve them from the exposed response object.
:::
