Beta ProductSQL Proxy is currently in beta. API endpoints may change.
Warehouse management endpoints allow you to configure which Databricks SQL warehouses the proxy can route queries to.
List Warehouses
GET /admin/warehouses
curl -X GET \
-H "Authorization: Bearer <proxy-manager-token>" \
https://sqlproxy.your-company.datafold.com/admin/warehouses
Get Warehouse
GET /admin/warehouses/{warehouse_id}
curl -X GET \
-H "Authorization: Bearer <proxy-manager-token>" \
https://sqlproxy.your-company.datafold.com/admin/warehouses/{warehouse_id}
Add Warehouse
POST /admin/warehouses
curl -X POST \
-H "Authorization: Bearer <proxy-manager-token>" \
-H "Content-Type: application/json" \
-d '{
"warehouse_id": "abc123def4567890",
"host": "workspace.cloud.databricks.com",
"is_default": true,
"size": "S",
"auto_stop_mins": 15,
"warehouse_type": "PRO",
"routing_label": "production"
}' \
https://sqlproxy.your-company.datafold.com/admin/warehouses
Request Body
| Field | Type | Required | Description |
|---|
warehouse_id | string | Yes | Databricks warehouse ID (16-character hex string, e.g., abc123def45678907890) |
host | string | Yes | Databricks workspace host (e.g., workspace.cloud.databricks.com) |
http_path | string | No | HTTP path to the warehouse. Derived from warehouse_id if omitted. |
is_default | boolean | No | Set as default warehouse for routing |
size | string | No | Warehouse size: 2XS, XS, S, M, L, XL, 2XL, 3XL, 4XL |
auto_stop_mins | integer | No | Auto-stop timeout in minutes |
warehouse_type | string | No | Warehouse type: CLASSIC, PRO, or SERVERLESS |
routing_label | string | No | Human-friendly routing_label for routing (must be unique). Use with @datafold:warehouse=routing_label directive. |
Update Warehouse
PUT /admin/warehouses/{warehouse_id}
curl -X PUT \
-H "Authorization: Bearer <proxy-manager-token>" \
-H "Content-Type: application/json" \
-d '{
"is_default": true,
"size": "M",
"routing_label": "staging"
}' \
https://sqlproxy.your-company.datafold.com/admin/warehouses/{warehouse_id}
Request Body
| Field | Type | Required | Description |
|---|
host | string | No | Databricks workspace host |
is_default | boolean | No | Set as default warehouse |
size | string | No | Warehouse size |
auto_stop_mins | integer | No | Auto-stop timeout in minutes |
warehouse_type | string | No | Warehouse type: CLASSIC, PRO, or SERVERLESS |
routing_label | string / null | No | Human-friendly routing_label for routing (must be unique). Set to null to clear. |
Delete Warehouse
DELETE /admin/warehouses/{warehouse_id}
curl -X DELETE \
-H "Authorization: Bearer <proxy-manager-token>" \
https://sqlproxy.your-company.datafold.com/admin/warehouses/{warehouse_id}
Set Default Warehouse
POST /admin/warehouses/{warehouse_id}/default
Sets a warehouse as the default for query routing when no routing directive is specified.
curl -X POST \
-H "Authorization: Bearer <proxy-manager-token>" \
https://sqlproxy.your-company.datafold.com/admin/warehouses/{warehouse_id}/default
Routing by Label
You can use the routing_label field to enable human-friendly routing directives in SQL queries. Instead of using the warehouse ID:
-- @datafold:warehouse=abc123def4567890
SELECT * FROM my_table;
You can use a meaningful routing_label:
-- @datafold:warehouse=production
SELECT * FROM my_table;
The proxy first attempts to match the directive value against warehouse routing_labels. If no routing_label matches, it falls back to treating the value as a warehouse ID, ensuring backward compatibility.