Coverage for src/chuck_data/warehouses.py: 0%

6 statements  

« 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""" 

4 

5 

6def list_warehouses(client): 

7 """ 

8 Lists all SQL warehouses in the Databricks workspace. 

9 

10 Args: 

11 client: DatabricksAPIClient instance 

12 

13 Returns: 

14 List of warehouses 

15 """ 

16 return client.list_warehouses() 

17 

18 

19def get_warehouse(client, warehouse_id): 

20 """ 

21 Gets information about a specific SQL warehouse. 

22 

23 Args: 

24 client: DatabricksAPIClient instance 

25 warehouse_id: ID of the SQL warehouse 

26 

27 Returns: 

28 Warehouse information 

29 """ 

30 return client.get_warehouse(warehouse_id) 

31 

32 

33def create_warehouse(client, opts): 

34 """ 

35 Creates a new SQL warehouse. 

36 

37 Args: 

38 client: DatabricksAPIClient instance 

39 opts: Dictionary containing warehouse configuration options 

40 

41 Returns: 

42 Created warehouse information 

43 """ 

44 return client.create_warehouse(opts)