sql_statements_execute
Execute a SQL statement on a Databricks warehouse and retrieve the statement ID and initial result. Poll to get final results when the statement completes.
Instructions
Execute a SQL statement against a warehouse. Returns the statement statement_id and result.
Poll :func:`sql_statements_get` (or fetch a chunk via :func:`sql_statements_get_result_chunk`)
to retrieve results once the statement finishes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| statement | Yes | The SQL statement to execute | |
| warehouse_id | Yes | Warehouse ID that runs the statement | |
| catalog | No | Default catalog | |
| schema | No | Default schema | |
| parameters | No | Positional/named parameter values (legacy positional form) | |
| row_limit | No | Row limit for the statement result set | |
| byte_limit | No | Byte limit for the statement result set | |
| disposition | No | INLINE | EXTERNAL_LINKS | |
| format | No | Result format: JSON | ARROW | CSV | |
| wait_timeout | No | How long to wait: '0s'..'50s' (default '10s') | |
| on_wait_timeout | No | CONTINUE | CANCEL — what to do if wait_timeout elapses | |
| parameters_list | No | List of statement parameters: [{name, type, value}, ...]. type may be STRING | INT | FLOAT | DOUBLE | BOOLEAN | DATE | TIMESTAMP | DECIMAL. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |