Allow Role to define a new UDF or UDAF under the Organization. The Role will also require USAGE privileges to the Function Source.
CREATE_QUERY
Allow Role to launch a new Query under the Organization. The Role will also additional privileges on Database, Schema, Relations and Stores in order to launch the Query.
MANAGE_MEMBERS
Allow Role to manage Roles, Invitations and Users.
MANAGE_GRANTS
Allow Role to manage all Privilege grants within the Organization.
ALL PRIVILEGES
Grants all the Privileges listed above to the Role.
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
<no-db>/<no-store># GRANT CREATE_DATABASE, CREATE_STORE ON ORGANIZATION TO rol1, rol2;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "create_database, || | | create_store" on "MR main" granted to ||||"rol1, rol2"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+--------------+---------+-----------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==============+=========+=================+====================+===============+|role|public|usage|false|orgadmin|+--------------+---------+-----------------+--------------------+---------------+|organization|MRmain|create_database|false|securityadmin|+--------------+---------+-----------------+--------------------+---------------+|organization|MRmain|create_store|false|securityadmin|+--------------+---------+-----------------+--------------------+---------------+
<no-db>/<no-store># GRANT CREATE_DATABASE, CREATE_STORE ON ORGANIZATION TO rol1, rol2 WITH GRANT OPTION;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "create_database, || | | create_store" on "MR main" granted to ||||"rol1, rol2"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+--------------+---------+-----------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==============+=========+=================+====================+===============+|role|public|usage|false|orgadmin|+--------------+---------+-----------------+--------------------+---------------+|organization|MRmain|create_database|true|securityadmin|+--------------+---------+-----------------+--------------------+---------------+|organization|MRmain|create_store|true|securityadmin|+--------------+---------+-----------------+--------------------+---------------+
Database Privileges
GRANT [ USAGE | CREATE | ALL PRIVILEGES , ... ]ONDATABASEdatabase_nameTOROLE role_name [, ...][WITH GRANT OPTION];
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
<no-db>/<no-store># GRANT USAGE ON DATABASE user_db TO rol1;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "user_db"||||grantedto"rol1"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+----------+---------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==========+=========+============+====================+===============+|role|public|usage|false|orgadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|usage|false|securityadmin|+----------+---------+------------+--------------------+---------------+
<no-db>/<no-store># GRANT USAGE,CREATE ON DATABASE user_db TO rol1 WITH GRANT OPTION;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "user_db"||||grantedto"rol1"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+----------+---------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==========+=========+============+====================+===============+|role|public|usage|false|orgadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|usage|true|securityadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|create|true|securityadmin|+----------+---------+------------+--------------------+---------------+
Database Schema Privileges
GRANT [ USAGE | CREATE | ALL PRIVILEGES ]ONSCHEMA schema_nameTOROLE role_name [, ...][WITH GRANT OPTION];
Description
Grants Schema privileges to one or more roles.
Arguments
USAGE
Allow Role to list, and use the Schemas. The Role will also additional privileges on Relations in order to use them.
CREATE
Allow Role to create Relations under the Schema.
ALL PRIVILEGES
Grants all the Privileges listed above to the Role.
schema_name
The qualified name of the Schema to grant privileges on. This name can include a specific Database name to form a fully qualified name in the format of <database_name>.<schema_name>, otherwise the current Database name in the session is used.
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
<no-db>/<no-store># GRANT USAGE,CREATE ON SCHEMA accounting_db.public TO rol1;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage, create" on ||||"public"grantedto"rol1"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+----------+---------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==========+=========+============+====================+===============+|role|public|usage|false|orgadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|usage|true|securityadmin|+----------+---------+------------+--------------------+---------------+|schema|public|usage|false|securityadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|create|true|securityadmin|+----------+---------+------------+--------------------+---------------+|schema|public|create|false|securityadmin|+----------+---------+------------+--------------------+---------------+
<no-db>/<no-store># GRANT USAGE,CREATE ON SCHEMA accounting_db.public TO rol1 WITH GRANT OPTION;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage, create" on ||||"public"grantedto"rol1"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+----------+---------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==========+=========+============+====================+===============+|role|public|usage|false|orgadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|usage|true|securityadmin|+----------+---------+------------+--------------------+---------------+|schema|public|usage|true|securityadmin|+----------+---------+------------+--------------------+---------------+|database|user_db|create|true|securityadmin|+----------+---------+------------+--------------------+---------------+|schema|public|create|true|securityadmin|+----------+---------+------------+--------------------+---------------+
Store Privileges
GRANT [ USAGE | ALL PRIVILEGES ] ON STORE store_nameTOROLE role_name [, ...][WITH GRANT OPTION];
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
<no-db>/<no-store># GRANT USAGE ON STORE kafka_pub TO rol2;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "kafka_pub"||||grantedto"rol2"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol2;+--------------+-----------+-----------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==============+===========+=================+====================+===============+|role|public|usage|false|orgadmin|+--------------+-----------+-----------------+--------------------+---------------+|store|kafka_pub|usage|false|securityadmin|+--------------+-----------+-----------------+--------------------+---------------+
<no-db>/<no-store># GRANT USAGE ON STORE kafka_pub TO rol2 WITH GRANT OPTION;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "kafka_pub"||||grantedto"rol2"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol2;+--------------+-----------+-----------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==============+===========+=================+====================+===============+|role|public|usage|false|orgadmin|+--------------+-----------+-----------------+--------------------+---------------+|store|kafka_pub|usage|true|securityadmin|+--------------+-----------+-----------------+--------------------+---------------+
Descriptor Source Privileges
GRANT [ USAGE | ALL PRIVILEGES ]ON DESCRIPTOR_SOURCE descriptor_source_nameTOROLE role_name [, ...][WITH GRANT OPTION];
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
demodb.public/demostore#GRANTUSAGEONDESCRIPTOR_SOURCEdemosourceTOrol1;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "demosource"||||grantedto"rol1"|+-----------------+----------+------------------------------------------+demodb.public/demostore#DESCRIBEROLErol1;+-------------------+--------------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+===================+==============+============+====================+===============+|role|public|usage|false|orgadmin|+-------------------+-------------------------+------------+--------------------+---------------+|descriptor_source|demosource|usage|false|securityadmin|+-------------------+--------------+------------+--------------------+---------------+
Relation Privileges
GRANT [SELECT | INSERT | ALL PRIVILEGES ]ON RELATION relation_nameTOROLE role_name [, ...][WITH GRANT OPTION];
Allow Role to create a Query and use the relation as a source.
INSERT
Allow Role to create a Query and use the relation as a sink.
relation_name
The name of the Relation to grant privileges on. Optionally, provide Database and Schema name for a fully qualified relation name in the format of [<database_name>.<schema_name>.]<relation_name>, e.g. db1.public.pageviews. Otherwise, the current Database and Schema will be used to identify the Relation.
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
demodb.public/demostore#GRANTUSAGEONFUNCTION_SOURCEdemofnsrcTOrol1;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "demofnsrc"||||grantedto"rol1"|+-----------------+----------+------------------------------------------+demodb.public/demostore#DESCRIBEROLErol1;+-------------------+-----------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+===================+===========+============+====================+===============+|role|public|usage|false|orgadmin|+-------------------+-----------+------------+--------------------+---------------+|function_source|demofnsrc|usage|false|sysadmin|+-------------------+-----------+------------+--------------------+---------------+
Function Privileges
GRANT [ USAGE | ALL PRIVILEGES ]ONFUNCTION function_identifierTOROLE role_name [, ...][WITH GRANT OPTION];
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
demodb.public/demostore#LISTFUNCTIONS;+----------------------------+-------+--------------+------------------+--------------------+----------+-------------+-------------------------------+-------------------------------+
| Signature | Type | Source Name | Class Name | Egress Allow URIs | Owner | Properties | Created At | Updated At |
+============================+=======+==============+==================+====================+==========+=============+===============================+===============================+
| upper(a VARCHAR) VARCHAR | udf | my_src | demo.DSUpperCase | | sysadmin | {} | 2024-06-06 03:35:52 +0000 UTC | 2024-06-06 03:35:52 +0000 UTC |
+----------------------------+-------+--------------+------------------+--------------------+----------+-------------+-------------------------------+-------------------------------+
demodb.public/demostore#GRANTUSAGEONFUNCTIONupper(avarchar) varcharTOrol1;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "upper"||||grantedto"rol1"|+-----------------+----------+------------------------------------------+demodb.public/demostore#DESCRIBEROLErol1;+-------------------+------------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+===================+============+============+====================+===============+|role|public|usage|false|orgadmin|+-------------------+------------+------------+--------------------+---------------+|function_source|demofnsrc|usage|false|sysadmin|+-------------------+------------+------------+--------------------+---------------+|function| my_func |usage|false|sysadmin|+-------------------+------------+------------+--------------------+---------------+
Region Privileges
GRANT [ USAGE | ALL PRIVILEGES ]ON REGION region_nameTOROLE role_name [, ...][WITH GRANT OPTION];
Description
Grants Region usage privileges to one or more roles.
By default, the public Role is granted access to all the regions. A Role with the MANAGE_GRANTS privilege can grant or revoke the Region USAGE privilege from other roles.
Arguments
USAGE
Allow Role to list, and use the Region to create Stores and launch Queries.
Grants privileges that allow the Role to grant the same privileges to other Roles.
Example
<no-db>/<no-store># DESCRIBE ROLE "public";+--------------+----------------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+==============+================+============+====================+===============+|role|public|usage|false|orgadmin|+--------------+----------------+------------+--------------------+---------------+|region|AWSus-east-1|usage|false|securityadmin|+--------------+----------------+------------+--------------------+---------------+
<no-db>/<no-store># GRANT USAGE ON REGION "AWS us-east-1" TO rol1;+-----------------+----------+------------------------------------------+|Type|Command|Summary|+=================+==========+==========================================+|privilegegrant|ALTER|Privilege(s) "usage" on "AWS us-east-1"||||grantedto"rol1"|+-----------------+----------+------------------------------------------+<no-db>/<no-store># DESCRIBE ROLE rol1;+-------------------+----------------+------------+--------------------+---------------+|Type|Name|Privilege|WithGrantOption|GrantedBy|+===================+================+============+====================+===============+|role|public|usage|false|orgadmin|+-------------------+----------------+------------+--------------------+---------------+|region|AWSus-east-1|usage|false|securityadmin|+-------------------+----------------+------------+--------------------+---------------+