> For the complete documentation index, see [llms.txt](https://docs.espresso.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.espresso.ai/databricks-optimizer/proxy-onboarding/proxy-onboarding-warehouse-access.md).

# Warehouse access

To onboard to the scheduler feature, ensure users have access to all the SQL warehouses we route to.

Granting warehouse access does not grant any data access. It only permits users to run statements on the warehouses; Unity Catalog permissions on the data itself are unchanged. Warehouses that Espresso AI creates on your behalf are automatically granted `CAN USE` for the workspace `users` group.

## Fast grant for all warehouses

For fast onboarding, run the following in a Databricks notebook (attached to Serverless compute) as a workspace admin. It grants `CAN USE` on every SQL warehouse in the workspace to the `users` group:

```python
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.sql import (
    WarehouseAccessControlRequest,
    WarehousePermissionLevel,
)

client = WorkspaceClient()

for warehouse in client.warehouses.list():
    client.warehouses.update_permissions(
        warehouse_id=warehouse.id,
        access_control_list=[
            WarehouseAccessControlRequest(
                group_name="users",
                permission_level=WarehousePermissionLevel.CAN_USE,
            )
        ],
    )
    print(f"Granted CAN USE on {warehouse.name} ({warehouse.id})")
```

Alternatively, grant **Can use** to the `users` group on each warehouse from **SQL Warehouses → \<warehouse> → Permissions** in the Databricks UI.
