Coverage for src/warehouses.py: 100%
6 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-06-05 22:56 -0700
« prev ^ index » next coverage.py v7.8.0, created at 2025-06-05 22:56 -0700
1"""
2Module for interacting with Databricks SQL warehouses.
3"""
6def list_warehouses(client):
7 """
8 Lists all SQL warehouses in the Databricks workspace.
10 Args:
11 client: DatabricksAPIClient instance
13 Returns:
14 List of warehouses
15 """
16 return client.list_warehouses()
19def get_warehouse(client, warehouse_id):
20 """
21 Gets information about a specific SQL warehouse.
23 Args:
24 client: DatabricksAPIClient instance
25 warehouse_id: ID of the SQL warehouse
27 Returns:
28 Warehouse information
29 """
30 return client.get_warehouse(warehouse_id)
33def create_warehouse(client, opts):
34 """
35 Creates a new SQL warehouse.
37 Args:
38 client: DatabricksAPIClient instance
39 opts: Dictionary containing warehouse configuration options
41 Returns:
42 Created warehouse information
43 """
44 return client.create_warehouse(opts)