Roles

Roles are the fundamental unit of permission management in the Lakehouse, packaging a set of privileges under a name and granting them to users. Role-Based Access Control (RBAC) enables centralized permission management and batch authorization.

RBAC Model

Privilege
  └── Role           ← Privileges packaged as roles
        └── User      ← Roles granted to users

A user can have multiple roles, and the effective permissions are the union of all assigned role permissions.

System Preset Roles

RoleScopePermission Description
account_adminAccount-levelManage all resources under the account
workspace_adminWorkspace-levelManage all resources within the workspace
workspace_devWorkspace-levelDevelop tasks, use data and compute clusters
workspace_userWorkspace-levelRead-only access to tasks and instances

Custom Roles

-- Create a custom role
CREATE ROLE analyst;

-- Grant privileges
GRANT SELECT ON TABLE orders TO ROLE analyst;
GRANT USAGE ON SCHEMA ods TO ROLE analyst;

-- Grant a role to a user
GRANT ROLE analyst TO USER alice;

-- View role privileges
SHOW GRANTS TO ROLE analyst;