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:
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.
Last updated