Data Permission List
Permission Matrix
Table 1 and Table 2 describe the permission matrix related to SQL statements, databases, tables, and roles in the platform.
| Authorization Type | LakeFormation Permission Type | Description |
|---|---|---|
| database | ALL | All operation permissions on the database. |
| ALTER | Modify the database. | |
| DROP | Delete the database. | |
| DESCRIBE | View database metadata information or switch databases. | |
| LIST_TABLE | View the list of resources under the database. | |
| LIST_FUNC | View functions under a specific database. | |
| CREATE_TABLE | Create a table in the database. | |
| CREATE_FUNC | Create a function in the database. | |
| table | ALL | All operation permissions on the table. |
| ALTER | Modify the table. | |
| DROP | Delete the table. | |
| DESCRIBE | View table metadata information. | |
| UPDATE | Update table data. | |
| INSERT | Insert table data. | |
| SELECT | Query data in the table. | |
| DELETE | Delete data from the table. | |
| column | SELECT | Query column data in the table. |
| function | ALL | All operation permissions on the function. |
| ALTER | Modify the function. | |
| DROP | Delete the function. | |
| DESCRIBE | View function metadata information. | |
| EXEC | Execute the function. |
| Category | SQL Statement | Required Permission |
|---|---|---|
| Database | DROP DATABASE db1 | DROP permission on db1. |
| CREATE TABLE tb1(...) | CREATE_TABLE permission under db1. | |
| CREATE VIEW v1 | CREATE_TABLE permission under db1. | |
| Table | SHOW CREATE TABLE tb1 | DESCRIBE permission on tb1. |
| DESCRIBE [EXTENDED|FORMATTED] tb1 | DESCRIBE permission on tb1. | |
| DROP TABLE [IF EXISTS] tb1 | DROP permission on tb1. | |
| SELECT count(*) FROM tb1 | SELECT permission on tb1. | |
| SELECT * FROM view1 | SELECT permission on view1. | |
| SELECT count(*) FROM view1 | SELECT permission on view1. | |
| LOAD DATA INPATH ... INTO TABLE | INSERT permission on tb1. | |
| INSERT INTO TABLE | INSERT permission on tb1. | |
| INSERT OVERWRITE TABLE | INSERT permission on tb1. | |
| ALTER TABLE ADD COLUMNS | ALTER permission on tb1. | |
| ALTER TABLE RENAME | ALTER permission on tb1. | |
| column | SELECT user_id FROM db.users; | SELECT permission on the user_id column in the db.users table. |
| function | ALTER FUNCTION db.calc_tax RENAME TO db.calc_tax_v2; | ALTER permission on the calc_tax function under db. |
| function | DROP FUNCTION IF EXISTS db.calc_tax; | DROP permission on the calc_tax function under db. |
| function | DESCRIBE FUNCTION EXTENDED db.calc_tax; | DESCRIBE permission on the calc_tax function under db. |
| function | SELECT db.calc_tax("xxx"); | EXEC permission on the calc_tax function under db. |
Precautions
- The essence of permission operations is that they are implemented through the platform-managed APIs, rather than by directly executing GRANT/REVOKE statements in the Spark SQL engine.
- Tables and views under the same database share a permission namespace.
- Users with GRANT_PRIVILEGE permission can grant permissions to other users.
- Users with REVOKE_PRIVILEGE permission can revoke permissions from other users.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot