API Query

Yahya24
New Contributor III

Hello,

I created a sql warehouse (cluster size = 2X-Small) and I wanted to use it to execute a query using the sql query api:

- url : https://databricks-host/api/2.0/preview/sql/statements
- params = {
'warehouse_id': 'warehouse_id',
'statement': 'SELECT * FROM db1.table1;',
'wait_timeout': '0s'
}

I got a response with a status 200 but with text in xml.

On the other hand when I use the queries api https://databricks-host/api/2.0/preview/sql/queries it works well, I have a json with all my queries already defined.

Best regards,