Skip to content

Commit 2e452eb

Browse files
feat(dwh): update db and users mgmt pages for beta MTA-6431 (#5664)
* feat(dwh): update db and users mgmt pages for beta MTA-6431 * feat(dwh): update * feat(dwh): update * feat(dwh): update * feat(dwh): update * Apply suggestions from code review Co-authored-by: Néda <[email protected]> --------- Co-authored-by: Néda <[email protected]>
1 parent 0232a10 commit 2e452eb

File tree

11 files changed

+289
-34
lines changed

11 files changed

+289
-34
lines changed

pages/data-warehouse/how-to/connect-applications.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ To connect your deployment with BI tools, refer to the [dedicated documentation]
1717

1818
- A Scaleway account logged into the [console](https://console.scaleway.com)
1919
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
20-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
2120
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2221

2322
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.

pages/data-warehouse/how-to/connect-bi-tools.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This page explains how to integrate your Data Warehouse for ClickHouse® deploym
1515

1616
- A Scaleway account logged into the [console](https://console.scaleway.com)
1717
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
18-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
1918
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2019

2120
## Tableau

pages/data-warehouse/how-to/create-deployment.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ A Data Warehouse is a centralized repository designed to store, manage, and anal
1515

1616
- A Scaleway account logged into the [console](https://console.scaleway.com)
1717
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
18-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
1918

2019
## Creating a Data Warehouse Deployment
2120

pages/data-warehouse/how-to/edit-autoscaling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This page explains how to edit the autoscaling configuration of your Data Wareho
1515

1616
- A Scaleway account logged into the [console](https://console.scaleway.com)
1717
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
18-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
18+
1919
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2020

2121
<Message type="important">

pages/data-warehouse/how-to/import-data.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Scaleway Data Warehouse for ClickHouse® allows you to quickly import any type o
1717

1818
- A Scaleway account logged into the [console](https://console.scaleway.com)
1919
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
20-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
20+
2121
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2222

2323
## How to import data using the ClickHouse® CLI

pages/data-warehouse/how-to/manage-databases.mdx

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,57 @@ dates:
99
import Requirements from '@macros/iam/requirements.mdx'
1010

1111

12-
This page explains how to manage databases in your Data Warehouse for ClickHouse® deployment using the [Scaleway console](https://console.scaleway.com/).
13-
14-
<Message type="note">
15-
During the private beta phase, database management can only be done with the **scwadmin** & via the ClickHouse® CLI, MySQL or HTTPS protocols.
16-
</Message>
12+
This page explains how to manage databases in your Data Warehouse for ClickHouse® deployment.
1713

1814
<Requirements />
1915

2016
- A Scaleway account logged into the [console](https://console.scaleway.com)
2117
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
22-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
2318
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2419

2520
## How to manage databases using the Scaleway console
2621

27-
During the private beta phase, the management of databases in your Data Warehouse for ClickHouse® deployment is limited to viewing databases in your deployment.
22+
The Scaleway console allows you to create and delete databases for your Data Warehouse for ClickHouse® deployment.
23+
24+
### How to create a database using the Scaleway console
25+
26+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
27+
28+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
29+
30+
3. Click the **Databases** tab. A list of your current databases displays.
31+
32+
4. Click **+ Create database**. A pop-up displays.
33+
34+
5. Enter a name for your new database. It can can only contain alphanumeric characters, underscores, and dashes.
35+
36+
6. Click **Create database** to confirm.
37+
38+
Your new database appears in the list.
39+
40+
### How to delete a database using the Scaleway console
41+
42+
<Message type="note">
43+
The `default` database cannot be deleted.
44+
</Message>
45+
46+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
47+
48+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
49+
50+
3. Click <Icon name="delete" /> next to the name of the database you want to delete. A confirmation pop-up displays.
51+
52+
4. Enter `DELETE`, then click **Delete database** to confirm.
53+
54+
The deleted database no longer appears in the list.
2855

2956
## How to manage databases using frameworks
3057

31-
[Connect to your deployment](/data-warehouse/how-to/connect-applications/) using your preferred framework.
32-
<Message type="tip">
33-
You can also connect using the ClickHouse HTTP console from the **Overview** tab of your deployment. Make sure to enter valid credentials in the top-right fields.
34-
</Message>
58+
[Connect to your deployment](/data-warehouse/how-to/connect-applications/) using your preferred framework.
59+
60+
<Message type="tip">
61+
You can also connect using the ClickHouse HTTP console from the **Overview** tab of your deployment. Make sure to enter valid credentials in the top-right fields.
62+
</Message>
3563

3664
Once connected, you can run SQL queries to `CREATE/ALTER/DROP` your `DATABASE/TABLE`.
3765

pages/data-warehouse/how-to/manage-delete-deployment.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This page explains how to manage and delete your Data Warehouse deployment.
1515

1616
- A Scaleway account logged into the [console](https://console.scaleway.com)
1717
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
18-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
1918
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2019

2120
## How to manage a Data Warehouse deployment
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
title: How to manage data storage in a Data Warehouse for ClickHouse® deployment
3+
description: This page explains how to manage data storage in a Data Warehouse for ClickHouse® deployment using storage policies
4+
tags: data storage policy strategy options object block
5+
dates:
6+
validation: 2025-10-16
7+
posted: 2025-10-16
8+
---
9+
10+
import Requirements from '@macros/iam/requirements.mdx'
11+
12+
<Requirements />
13+
14+
- A Scaleway account logged into the [console](https://console.scaleway.com)
15+
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
16+
17+
## Overview
18+
19+
Scaleway Data Warehouse for ClickHouse® uses ClickHouse®'s native storage policies to decide where table data lives: on Scaleway Block storage, and/or on Object Storage (Amazon S3). Policies are applied at table-level during table creation, using the settings presented below. You can choose between three policies for your deployment:
20+
21+
- `tiered` (default in Scaleway Data Warehouse for ClickHouse®)
22+
- `s3_cache` (cache mode)
23+
- `default` (local-only mode)
24+
25+
The table below provides an overview of each storage policy's behavior and use case.
26+
27+
| Storage&nbsp;policy | Behavior | When to use |
28+
|------|---------|------------|
29+
| `tiered` | Writes on Block Storage first, and parts are automatically moved to Object Storage when disk is 90% full. | General purpose setting for fast local writes and transparent spillover to Object Storage as the dataset grows. |
30+
| `s3_cache` | Data is stored on Object Storage. A local Block Storage cache layer keeps frequently-read parts to accelerate repeated reads. | Large datasets that mostly live in Object Storage, with repeated reads on smaller subsets that benefit from local caching. |
31+
| `default` | Data is stored on Block storage only. | Small datasets where lowest latency for reads/writes on local disk is desired and capacity fits the Block Storage volume. |
32+
33+
## Tiered storage policy
34+
35+
### Applying the tiered policy
36+
37+
**Tiered** is the deployment's default policy. Data is stored on the `hot` volume (Block Storage) until it reaches 90% of its capacity, then data is moved to the `cold` volume. This mechanism is controlled by `move_factor:0.1`.
38+
39+
[Connect to you deployment](/data-warehouse/how-to/connect-applications/), then run the SQL query below to apply the `tiered` storage policy.
40+
41+
<Tabs id="tiered-explicit-implicit">
42+
<TabsTab label="Explicit">
43+
44+
Storage policy is explicitly defined as `tiered`.
45+
46+
```sql
47+
CREATE TABLE tiered_table
48+
(
49+
id UInt64,
50+
ts DateTime,
51+
value Float32
52+
)
53+
ENGINE = MergeTree
54+
PARTITION BY toYYYYMM(ts)
55+
ORDER BY id
56+
SETTINGS storage_policy = 'tiered';
57+
```
58+
59+
</TabsTab>
60+
<TabsTab label="Implicit">
61+
62+
Storage policy is not defined, ClickHouse® applies the `tiered` storage policy by default.
63+
64+
```sql
65+
CREATE TABLE dw.tiered_table_implicit
66+
(
67+
id UInt64,
68+
ts DateTime,
69+
value Float32
70+
)
71+
ENGINE = MergeTree
72+
PARTITION BY toYYYYMM(ts)
73+
ORDER BY id;
74+
```
75+
</TabsTab>
76+
</Tabs>
77+
78+
<Message type="note">
79+
If you omit the `storage_policy` setting, ClickHouse® will automatically apply the `tiered` policy.
80+
</Message>
81+
82+
### Moving data with the tiered policy
83+
84+
When using the `tiered` storage policy, you can manually move partitions between `hot` (Block Storage) and `cold` (Object Storage) volumes using the SQL queries below.
85+
86+
- Moving specific partitions to the `cold` volume (Object Storage):
87+
88+
```sql
89+
ALTER TABLE tiered_table MOVE PARTITION '2024-08' TO VOLUME 'cold';
90+
```
91+
92+
- Moving a non-partitioned table (`tuple()`) to the `cold` volume (Object Storage):
93+
94+
```sql
95+
ALTER TABLE tiered_table_without_partitions MOVE PARTITION tuple() TO VOLUME 'cold';
96+
```
97+
98+
- Moving a partition to the `hot` volume (Block Storage):
99+
100+
```sql
101+
ALTER TABLE tiered_table MOVE PARTITION '2024-08' TO VOLUME 'hot';
102+
```
103+
- Moving a non-partitioned table (`tuple()`) to the `hot` volume (Block Storage):
104+
105+
```sql
106+
ALTER TABLE tiered_table_without_partitions MOVE PARTITION tuple() TO VOLUME 'hot';
107+
```
108+
109+
## S3 cache policy
110+
111+
[Connect to your deployment](/data-warehouse/how-to/connect-applications/), then run the SQL query below to create a new table with the `s3_cache` policy enabled.
112+
```sql
113+
CREATE TABLE cache_table
114+
(
115+
id UInt64,
116+
ts DateTime,
117+
value Float32
118+
)
119+
ENGINE = MergeTree
120+
PARTITION BY toYYYYMM(ts)
121+
ORDER BY id
122+
SETTINGS storage_policy = 's3_cache';
123+
```
124+
125+
## Local-only policy
126+
127+
[Connect to your deployment](/data-warehouse/how-to/connect-applications/), then run the SQL query below to create a new table with the `default` (Block Storage only) policy enabled.
128+
129+
```sql
130+
CREATE TABLE local_table
131+
(
132+
id UInt64,
133+
ts DateTime,
134+
value Float32
135+
)
136+
ENGINE = MergeTree
137+
PARTITION BY toYYYYMM(ts)
138+
ORDER BY id
139+
SETTINGS storage_policy = 'default';
140+
```
141+

pages/data-warehouse/how-to/manage-users.mdx

Lines changed: 97 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,63 @@ dates:
99
import Requirements from '@macros/iam/requirements.mdx'
1010

1111

12-
This page explains how to manage users in your Data Warehouse for ClickHouse® deployment using the [Scaleway console](https://console.scaleway.com/).
13-
14-
<Message type="note">
15-
During the private beta phase, user management can only be done with the **scwadmin** user via the ClickHouse® CLI, MySQL or HTTPS protocols.
16-
</Message>
12+
This page explains how to manage users in your Data Warehouse for ClickHouse® deployment.
1713

1814
<Requirements />
1915

2016
- A Scaleway account logged into the [console](https://console.scaleway.com)
2117
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
22-
- [Signed up to the private beta](https://www.scaleway.com/fr/betas/) and received a confirmation email.
2318
- Created a [Data Warehouse deployment](/data-warehouse/how-to/create-deployment/)
2419

2520
## How to manage users using the Scaleway console
2621

27-
During the private beta phase, the management of users for your Data Warehouse for ClickHouse® deployment is limited to:
28-
- Viewing users in your deployment
29-
- Changing the password of an existing user
22+
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.
23+
24+
### How to create a user using the Scaleway console
25+
26+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
27+
28+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
29+
30+
3. Click the **Users** tab. A list of your current users displays.
31+
32+
4. Click **+ Create user**. A pop-up displays.
33+
34+
5. 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.
35+
36+
6. Enter a password, or generate one automatically.
37+
38+
7. Enable the toggle if you want to grant admin rights to the user.
39+
40+
8. Click **Create user** to proceed.
41+
42+
The newly created user appears in the list of your deployment's users.
43+
44+
### How to update a user's password and admin rights
45+
46+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
47+
48+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
49+
50+
3. Click the **Users** tab. A list of your current users displays.
51+
52+
4. Click <Icon name="more" /> next to the name of the user you want to update, then click **Update user**. A pop-up displays.
53+
54+
5. Update the user's password and/or admin rights, then click **Update user** to confirm.
55+
56+
### How to delete a user using the Scaleway console
57+
58+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
59+
60+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
61+
62+
3. Click the **Users** tab. A list of your current users displays.
63+
64+
4. Click <Icon name="delete" /> next to the name of the user you want to delete. A confirmation pop-up displays.
65+
66+
5. Enter `DELETE`, then click **Delete user** to confirm.``
67+
68+
The user is deleted and no longer appears in the list.
3069

3170
## How to manage users using frameworks
3271

@@ -37,4 +76,52 @@ During the private beta phase, the management of users for your Data Warehouse f
3776

3877
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.
3978

40-
Refer to the official ClickHouse® documentation on [users and roles](https://clickhouse.com/docs/sql-reference/statements/create/user) for more information.
79+
Refer to the official ClickHouse® documentation on [users and roles](https://clickhouse.com/docs/sql-reference/statements/create/user) for more information.
80+
81+
## Manage user permissions
82+
83+
[Connect to your deployment](/data-warehouse/how-to/connect-applications/) using your preferred framework.
84+
85+
Once connected, you can run SQL as shown below to grant the desired permissions to users.
86+
87+
**Grant permission to create databases**
88+
89+
```sql
90+
GRANT CREATE DATABASE ON . TO user;
91+
```
92+
93+
**Grant permission to create tables in any database**
94+
95+
```sql
96+
GRANT CREATE TABLE ON . TO user;
97+
```
98+
99+
**Grant permission to create tables in a specific database**
100+
101+
```sql
102+
GRANT CREATE TABLE ON database_name.* TO user;
103+
```
104+
105+
**Grant data manipulation permissions for any table in any database**
106+
107+
```sql
108+
GRANT INSERT, UPDATE, DELETE ON . TO user;
109+
```
110+
111+
**Grant data manipulation permissions for any table in a specific database**
112+
113+
```sql
114+
GRANT INSERT, UPDATE, DELETE ON database_name.* TO user;
115+
```
116+
117+
**Grant data manipulation permissions for a specific table in a specific database**
118+
119+
```sql
120+
GRANT INSERT, UPDATE, DELETE ON database_name.table_name TO user;
121+
```
122+
123+
**Grant every permissions on every database**
124+
125+
```sql
126+
GRANT CREATE DATABASE, CREATE TABLE, INSERT, UPDATE, DELETE ON . TO user;
127+
```

0 commit comments

Comments
 (0)