# Execute a Message SQL Query

> Execute a Message SQL Query activity in the Databricks connector.

## Project compatibility

Windows | Cross-platform

## Overview

| Description | API Method | API Path |
| --- | --- | --- |
| Run the SQL that Genie generated for a message and return the result set under statement_response. Requires space_id, conversation_id and message_id. | POST | `/genie_execute_query/{space_id}/{conversation_id}/{message_id}` |

## Input

| Parameter | Description | Data Type |
| --- | --- | --- |
| Message Id \* | ID of the Genie message. For example, `01f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4`. | string |
| Conversation Id \* | ID of the Genie conversation. For example, `01f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4`. | string |
| Space Id \* | ID of the Genie space. For example, `01f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4`. | string |

\* Required parameter.

## Output

| Parameter | Description | Data Type |
| --- | --- | --- |
| Statement Response | SQL Statement Execution API response: status, manifest and 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.
:::
