Skip to main content

Access Control Privileges

This topic describes the privileges that are available in the Databend access control model.

All Privileges

PrivilegeObject TypeDescription
ALLAllGrants all the privileges for the specified object type.
ALTERGlobal, Database, Table, ViewPrivilege to alter databases or tables, Alter user/UDF.
CREATEGlobal, Database, TablePrivilege to create databases or tables or udf.
DELETETablePrivilege to delete or truncate rows in a table.
DROPGlobal, Database, Table, ViewPrivilege to drop databases or tables or views and undrop databases or tables, Drop UDF.
INSERTTablePrivilege to insert rows into tables.
SELECTDatabase, TablePrivilege to select rows from tables, show or use databases.
UPDATETablePrivilege to update rows in a table
GRANTGlobalPrivilege to Grant/Revoke privileges to users or roles
SUPERGlobal, TablePrivilege to Kill query, Set global configs, Optimize table, Analyze table, Operator stage/catalog/share.
USAGEGlobalUsagePrivilege is a synonym for “no privileges”
CREATE ROLEGlobalPrivilege to create a role
DROP ROLEGlobalPrivilege to drop a role
CREATE USERGlobalPrivilege to create a sql user
CREATE USERGlobalPrivilege to drop a sql user

Global Privileges

PrivilegeUsage
ALLGrants all the privileges for the specified object type.
GRANTAdd/Drop table Column, Alter table cluster key, Re-cluster table
CREATEROLECreate a new role.
DROPUSERDrop a new user.
CREATEUSERCreate a new user.
DROPROLEDrop a new role.
SUPERKill query, Set/Unset settings, operator stage/catalog/share, Call function, Copy into stage
USAGEOnly can connect to databend query, but no privileges
CREATECreate UDF
DROPDrop UDF
ALTERAlter UDF, ALter sql user

Table Privileges

PrivilegeUsage
ALLGrants all the privileges for the specified object type.
ALTERAdd/Drop table Column, Alter table cluster key, Re-cluster table, Revert table
CREATECreate table
DELETEDelete rows in a table, Truncate table
DROPDrop table, Undrop table(restores the recent version of a dropped table)
INSERTInsert rows into table, Copy into table
SELECTSelect rows from tables, Show create table, Describe table
UPDATEUpdate rows in a table
SUPEROptimize/Analyze table need super privilege

View Privileges

PrivilegeUsage
ALLGrants all the privileges for the specified object type
ALTERCreate/Drop view, Alter the existing view by using another QUERY
DROPDrop view

Database Privileges

PrivilegeUsage
AlterRename database
CREATECreate database
DROPDrop database, Undrop database(restores the recent version of a dropped database)
SELECTShow create database, Use database,

Session Policy Privileges

PrivilegeUsage
SUPERKill query, Set/Unset settings
ALLGrants all the privileges for the specified object type.

Stage Privileges

PrivilegeUsage
SUPERList Stage, Create Stage, Drop Stage, Remove Stage
ALLGrants all the privileges for the specified object type.

Catalog Privileges

PrivilegeUsage
SUPERShow create catalog, Create catalog, Drop catalog
ALLGrants all the privileges for the specified object type.

Catalog Privileges

PrivilegeUsage
SUPERCreate share, Drop share, Desc share, Show shares
ALLGrants all the privileges for the specified object type.