Introduction to DW Users
"DW" in term "DW user" stands for data warehouse. DW users are users in Relyt's data warehouses — DW service units.
Overview
DW users are the entities that operate and use database objects in DW service units. They can create, manage, and use database objects in sepcific service units. In Relyt, DW users can only be acted by cloud accounts or created via invitation. This design not only faciliates the usage of DW service units but also implements effective resource isolation between DW service units, thus ensuring your data security without any compromise of simplicity.
Types of DW users
In Relyt, DW users can only be acted by cloud accounts or created via invitation. However, DW users acted by cloud accounts of different system roles have different functionality in DW service units. Based on their functionality, DW users can be classfified into the following two types:
- DW users acted by cloud accounts
- DW users created via invitation
The following table provides the comparison between the two types of DW users.
Funtionality | Acted by cloud accounts | Invited |
---|---|---|
Manage DPS clusters | Yes | No |
Invite DW users | Yes | No |
Drop DW users | Yes, only those invited by themselves | No |
Terminate connections | Yes, connections from themselves and from DW users they invite | Yes, connections only from themselves |
Manage database objects | Yes | Yes |
All DW users can manage database objects, as shown in the preceding table. However, when managing database objects, DW users' behavior is restricted by many rules.
Guidelines for managing database objects
DW users in a DW service unit can view all database objects in the DW service unit. However, their privileges when it comes to managing these database objects may differ.
All DW users can create databases. However, a database can be dropped only by its owner. Note that after a database is dropped, all catalog entries of the database as well as the directory that contains the data are dropped.
Each database has a default schema named public
. All DW users can create database objects in schema public
. Every database object in schema public
is visible to all DW users but can only be altered or dropped by its owner.
Only the owner of a database can create schemas in the database. Only the owner of a schema can alter or drop the schema.
DW users granted with specific privileges on a database object can perform specific operations on the database object. For example, a DW user granted with the USAGE
privilege on a schema can access all objects contained in the schema.
A DW user can grant only the privileges it owns to another. Suppose DW user user_A
is the owner of schema schema_a
and schema_a
has two tables table_1
and table_2
. table_1
is owned by DW user user_A
and table_2
is owned by DW user user_B
. DW user user_A
can only transfer the owner of table_1
to another DW user but cannot change the ownership of table_2
though DW user user_A
can access table_2
. For more information about privilege granting, see GRANT.
By default, the creator of a database object is its owner, but the ownership can be transferred by running GRANT ALL [PRIVILEGES] ON ... TO
or ALTER ... OWNER TO
by the current owner. For more information, see GRANT or ALTER TABLE, ALTER SCHEMA, ALTER EXTERNAL TABLE, ALTER FUNCTION, or ALTER VIEW based on the database object type.