How to manage users in Scaleway Data Warehouse for ClickHouse®
This page explains how to manage users in your Data Warehouse for ClickHouse® deployment.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created a Data Warehouse deployment
How to manage users using the Scaleway console
The Scaleway console allows you to create users for your Data Warehouse for ClickHouse® deployment, to grant them admin rights, to update their password, and to delete them.
How to create a user using the Scaleway console
-
Click ClickHouse® under Data & Analytics on the side menu. The Data Warehouse deployment page displays.
-
Click the name of the desired Data Warehouse deployment. The Overview tab of the deployment displays.
-
Click the Users tab. A list of your current users displays.
-
Click + Create user. A pop-up displays.
-
Enter a username. It must be unique, contain up to 63 characters, and must start with a letter. Only alphanumeric characters, underscores, and dashes are accepted.
-
Enter a password, or generate one automatically.
-
Enable the toggle if you want to grant admin rights to the user.
-
Click Create user to proceed.
The newly created user appears in the list of your deployment's users.
How to update a user's password and admin rights
-
Click ClickHouse® under Data & Analytics on the side menu. The Data Warehouse deployment page displays.
-
Click the name of the desired Data Warehouse deployment. The Overview tab of the deployment displays.
-
Click the Users tab. A list of your current users displays.
-
Click more icon next to the name of the user you want to update, then click Update user. A pop-up displays.
-
Update the user's password and/or admin rights, then click Update user to confirm.
How to delete a user using the Scaleway console
-
Click ClickHouse® under Data & Analytics on the side menu. The Data Warehouse deployment page displays.
-
Click the name of the desired Data Warehouse deployment. The Overview tab of the deployment displays.
-
Click the Users tab. A list of your current users displays.
-
Click delete icon next to the name of the user you want to delete. A confirmation pop-up displays.
-
Enter
DELETE, then click Delete user to confirm.``
The user is deleted and no longer appears in the list.
How to manage users using frameworks
Connect to your deployment using your preferred framework.
Once connected, you can run SQL queries using USER, ROLE, and ROW POLICY to create new users and grant them the desired permissions via roles.
Refer to the official ClickHouse® documentation on users and roles for more information.
Manage user permissions
Connect to your deployment using your preferred framework.
Once connected, you can run SQL as shown below to grant the desired permissions to users.
Grant permission to create databases
GRANT CREATE DATABASE ON . TO user;Grant permission to create tables in any database
GRANT CREATE TABLE ON . TO user;Grant permission to create tables in a specific database
GRANT CREATE TABLE ON database_name.* TO user;Grant data manipulation permissions for any table in any database
GRANT INSERT, UPDATE, DELETE ON . TO user;Grant data manipulation permissions for any table in a specific database
GRANT INSERT, UPDATE, DELETE ON database_name.* TO user;Grant data manipulation permissions for a specific table in a specific database
GRANT INSERT, UPDATE, DELETE ON database_name.table_name TO user;Grant every permissions on every database
GRANT CREATE DATABASE, CREATE TABLE, INSERT, UPDATE, DELETE ON . TO user;