Function Description
Revokes previously granted privileges from a role or user. The REVOKE statement can revoke permissions at various levels, including workspace, workspace object, Schema, and Schema object levels.
Workspace User and Role Permission Management Syntax
Privilege Type Description
| Privilege Type | Description | Example |
|---|---|---|
workspacePrivileges | Privileges to create objects in a workspace | CREATE SCHEMA, CREATE VCLUSTER |
workspaceObjectPrivileges | Privileges to modify workspace objects and view metadata | ALTER, DROP, READ METADATA, ALL [PRIVILEGES] |
schemaPrivileges | Privileges to create objects in a Schema | CREATE TABLE, CREATE VIEW, CREATE MATERIALIZED VIEW |
schemaObjectPrivileges | Privileges to modify, drop, and query Schema objects | ALTER, DROP, SELECT, INSERT, READ METADATA, ALL |
Usage Examples
-
Revoke from role
simple_rolethe privilege to create VCLUSTERs in the workspace: -
Revoke from role
simple_roletheALTERprivilege on the VCLUSTER nameddefault: -
Revoke from role
uat_demothe privilege to create tables and views in thepublicSchema: -
Revoke from role
reporting_roletheREAD METADATAprivilege on the DATALAKE namedsales_data: -
Revoke from role
admin_roletheALTERandDROPprivileges on the FUNCTION namedorder_summary: -
Revoke from role
analyst_roletheSELECTandINSERTprivileges on the tablecustomer_ordersin thepublicSchema: -
Revoke role
test_readonly_rolefrom usertester:
Notes
- Executing this command requires the
workspace_adminorsecurity_adminrole. - After revocation, the revoked party will immediately lose the ability to access the corresponding resource.
- You can verify the revocation result using
SHOW GRANTS TO ROLE role_nameorSHOW GRANTS TO USER user_name.
Instance Role Permission Management
LakeHouse supports fine-grained revocation of cross-workspace permissions for Instance Roles, ensuring flexibility and security in permission control.
