Initial system setup
Suppose we need to make initial system settings to run one user who will have one role. The user will work on one compute pool inside one circuit.
In order for the actions described below to be possible, they must be performed either by an administrator or by a user with privileges to create other users, roles and compute pools. |
-
Create the
analyst
role:CREATE ROLE analyst;
-
Create the
compute_s
compute pool and set the size of theS
computes for it:CREATE WORKER POOL compute_s WORKER SIZE S;
-
Create user
tengri_demo_user
, set its password for identification and assign the default compute poolcompute_s
to it:CREATE USER tengri_demo_user IDENTIFIED BY PASSWORD '***' DEFAULT WORKER POOL compute_s;
-
Assign the
tengri_demo_user
user theanalyst
role:GRANT ROLE analyst TO tengri_demo_user;
-
Grant the
analyst
role theUSAGE
andMONITOR
privileges on thecompute_s
compute pool:GRANT USAGE, MONITOR ON WORKER POOL compute_s TO ROLE analyst;
Next:
-
if the system already has an
analytical_sandbox
schema and our user will only work in it, then grant him the privilege to work with all tables within that schema, both existing and those to be created in the future:GRANT ALL ON SCHEMA analytical_sandbox TO ROLE analyst;
-
if the user will be working in a new schema, then create this
analytical_sandbox_new
schema and grant him the privilege to work with all tables within this schema:CREATE SCHEMA analytical_sandbox_new; GRANT ALL ON SCHEMA analytical_sandbox_new TO ROLE analyst;
-
-
If the user
tengri_demo_user
is expected to create new schemas, then grant him the privilege to create a schema within the catalogue:GRANT CREATE SCHEMA ON CATALOG TO ROLE analyst;
The tengri_demo_user
user will then be able to:
-
Create tables within the
analytical_sandbox
(oranalytical_sandbox_new
) schema -
Read tables inside the
analytical_sandbox
(oranalytical_sandbox_new
) schema
With these settings the user
|