Skip to content

Commit 2f6968f

Browse files
committed
Merge main into branch and fix conflict
2 parents 551c373 + a26dcd5 commit 2f6968f

File tree

381 files changed

+23850
-4913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+23850
-4913
lines changed

contribute/autogenerated-documentation-from-source.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,16 @@ TO DO
6161
## Functions
6262

6363
Documentation for functions is autogenerated from the documentation in system tables (`system.functions`) which is
64-
registered along with the function registration in the C++ code.
64+
registered along with the function registration in the C++ code. ([Example](https://github.com/ClickHouse/ClickHouse/blob/a0216c8120f00479f50237e41c897c2bf244e1ef/src/Functions/FunctionChar.cpp#L116-L158))
6565

66-
To add a new page:
67-
- add SQL to generate the markdown from system tables
68-
- update `autogenerate-settings.sh` in the section which specifies which markdown file contents to
69-
copy to which file in between the `<!--AUTOGENERATED_START-->` and `<!--AUTOGENERATED_END-->`
66+
This [script](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/autogenerate-settings.sh) is used to generate
67+
the markdown docs for functions.
7068

71-
The following pages are autogenerated from the source code for functions:
72-
- [Arithmetic](/sql-reference/functions/arithmetic-functions) ([SQL](../scripts/settings/arithmetic-functions.sql))
73-
- [Arrays](/sql-reference/functions/array-functions) ([SQL](../scripts/settings/array-functions.sql))
74-
- [Bit](/sql-reference/functions/bit-functions) ([SQL](../scripts/settings/bit-functions.sql))
75-
- [Bitmap](/sql-reference/functions/bitmap-functions) ([SQL](../scripts/settings/bitmap-functions.sql))
76-
- [Comparison](/sql-reference/functions/comparison-functions) ([SQL](../scripts/settings/comparison-functions.sql))
77-
- [Conditional](/sql-reference/functions/conditional-functions) ([SQL](../scripts/settings/conditional-functions.sql))
69+
Adding a new page can be done by:
7870

71+
1. Adding the function [category](https://github.com/ClickHouse/ClickHouse/blob/85700c135ccad89d3651a7a92ca63bb989743ba6/src/Common/FunctionDocumentation.cpp#L222-L273) to the [list of function categories to generate](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L253-L278).
72+
2. The docs are automatically generated for the categories defined above by [this SQL code](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/generate-functions.sql). It produces a temporary markdown file with convention: `category-functions.md`. If the category name contains spaces, e.g. "String Splitting" then the temporary file will be `string_splitting-functions.md`.
73+
3. Register the temporary file name [here](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L372)
74+
4. Register the destination file you want to insert the markdown into [here](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L399)
75+
76+
The script takes the content of the temporary markdown file and inserts it into the destination file between tags `<!--AUTOGENERATED_START-->` and `<!--AUTOGENERATED_END-->`. If those tags do not exist you will get a warning.

docs/_snippets/_users-and-roles-common.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,49 +120,51 @@ With this set of examples:
120120

121121
Roles are used to define groups of users for certain privileges instead of managing each user separately.
122122

123-
1. Create a role to restrict users of this role to only see `column1` in database `db1` and `table1`:
123+
<VerticalStepper headerLevel="h5">
124+
125+
##### Create a role to restrict users of this role to only see `column1` in database `db1` and `table1`: {#create-column-role}
124126

125127
```sql
126128
CREATE ROLE column1_users;
127129
```
128130

129-
2. Set privileges to allow view on `column1`
131+
##### Set privileges to allow view on `column1` {#set-column-privileges}
130132

131133
```sql
132134
GRANT SELECT(id, column1) ON db1.table1 TO column1_users;
133135
```
134136

135-
3. Add the `column_user` user to the `column1_users` role
137+
##### Add the `column_user` user to the `column1_users` role {#add-column-user-to-role}
136138

137139
```sql
138140
GRANT column1_users TO column_user;
139141
```
140142

141-
4. Create a role to restrict users of this role to only see selected rows, in this case, only rows containing `A` in `column1`
143+
##### Create a role to restrict users of this role to only see selected rows, in this case, only rows containing `A` in `column1` {#create-row-role}
142144

143145
```sql
144146
CREATE ROLE A_rows_users;
145147
```
146148

147-
5. Add the `row_user` to the `A_rows_users` role
149+
##### Add the `row_user` to the `A_rows_users` role {#add-row-user-to-role}
148150

149151
```sql
150152
GRANT A_rows_users TO row_user;
151153
```
152154

153-
6. Create a policy to allow view on only where `column1` has the values of `A`
155+
##### Create a policy to allow view on only where `column1` has the values of `A` {#create-row-policy}
154156

155157
```sql
156158
CREATE ROW POLICY A_row_filter ON db1.table1 FOR SELECT USING column1 = 'A' TO A_rows_users;
157159
```
158160

159-
7. Set privileges to the database and table
161+
##### Set privileges to the database and table {#set-db-table-privileges}
160162

161163
```sql
162164
GRANT SELECT(id, column1, column2) ON db1.table1 TO A_rows_users;
163165
```
164166

165-
8. grant explicit permissions for other roles to still have access to all rows
167+
##### Grant explicit permissions for other roles to still have access to all rows {#grant-other-roles-access}
166168

167169
```sql
168170
CREATE ROW POLICY allow_other_users_filter
@@ -173,17 +175,21 @@ Roles are used to define groups of users for certain privileges instead of manag
173175
When attaching a policy to a table, the system will apply that policy, and only those users and roles defined will be able to do operations on the table, all others will be denied any operations. In order to not have the restrictive row policy applied to other users, another policy must be defined to allow other users and roles to have regular or other types of access.
174176
:::
175177

178+
</VerticalStepper>
179+
176180
## Verification {#verification}
177181

178182
### Testing role privileges with column restricted user {#testing-role-privileges-with-column-restricted-user}
179183

180-
1. Log into the clickhouse client using the `clickhouse_admin` user
184+
<VerticalStepper headerLevel="h5">
185+
186+
##### Log into the clickhouse client using the `clickhouse_admin` user {#login-admin-user}
181187

182188
```bash
183189
clickhouse-client --user clickhouse_admin --password password
184190
```
185191

186-
2. Verify access to database, table and all rows with the admin user.
192+
##### Verify access to database, table and all rows with the admin user. {#verify-admin-access}
187193

188194
```sql
189195
SELECT *
@@ -201,13 +207,13 @@ Roles are used to define groups of users for certain privileges instead of manag
201207
└────┴─────────┴─────────┘
202208
```
203209

204-
3. Log into the ClickHouse client using the `column_user` user
210+
##### Log into the ClickHouse client using the `column_user` user {#login-column-user}
205211

206212
```bash
207213
clickhouse-client --user column_user --password password
208214
```
209215

210-
4. Test `SELECT` using all columns
216+
##### Test `SELECT` using all columns {#test-select-all-columns}
211217

212218
```sql
213219
SELECT *
@@ -230,7 +236,7 @@ Roles are used to define groups of users for certain privileges instead of manag
230236
Access is denied since all columns were specified and the user only has access to `id` and `column1`
231237
:::
232238

233-
5. Verify `SELECT` query with only columns specified and allowed:
239+
##### Verify `SELECT` query with only columns specified and allowed: {#verify-allowed-columns}
234240

235241
```sql
236242
SELECT
@@ -250,15 +256,19 @@ Roles are used to define groups of users for certain privileges instead of manag
250256
└────┴─────────┘
251257
```
252258

259+
</VerticalStepper>
260+
253261
### Testing role privileges with row restricted user {#testing-role-privileges-with-row-restricted-user}
254262

255-
1. Log into the ClickHouse client using `row_user`
263+
<VerticalStepper headerLevel="h5">
264+
265+
##### Log into the ClickHouse client using `row_user` {#login-row-user}
256266

257267
```bash
258268
clickhouse-client --user row_user --password password
259269
```
260270

261-
2. View rows available
271+
##### View rows available {#view-available-rows}
262272

263273
```sql
264274
SELECT *
@@ -278,37 +288,41 @@ Roles are used to define groups of users for certain privileges instead of manag
278288
Verify that only the above two rows are returned, rows with the value `B` in `column1` should be excluded.
279289
:::
280290

291+
</VerticalStepper>
292+
281293
## Modifying users and roles {#modifying-users-and-roles}
282294

283295
Users can be assigned multiple roles for a combination of privileges needed. When using multiple roles, the system will combine the roles to determine privileges, the net effect will be that the role permissions will be cumulative.
284296

285297
For example, if one `role1` allows for only select on `column1` and `role2` allows for select on `column1` and `column2` then the user will have access to both columns.
286298

287-
1. Using the admin account, create new user to restrict by both row and column with default roles
299+
<VerticalStepper headerLevel="h5">
300+
301+
##### Using the admin account, create new user to restrict by both row and column with default roles {#create-restricted-user}
288302

289303
```sql
290304
CREATE USER row_and_column_user IDENTIFIED BY 'password' DEFAULT ROLE A_rows_users;
291305
```
292306

293-
2. Remove prior privileges for `A_rows_users` role
307+
##### Remove prior privileges for `A_rows_users` role {#remove-prior-privileges}
294308

295309
```sql
296310
REVOKE SELECT(id, column1, column2) ON db1.table1 FROM A_rows_users;
297311
```
298312

299-
3. Allow `A_row_users` role to only select from `column1`
313+
##### Allow `A_row_users` role to only select from `column1` {#allow-column1-select}
300314

301315
```sql
302316
GRANT SELECT(id, column1) ON db1.table1 TO A_rows_users;
303317
```
304318

305-
4. Log into the ClickHouse client using `row_and_column_user`
319+
##### Log into the ClickHouse client using `row_and_column_user` {#login-restricted-user}
306320

307321
```bash
308322
clickhouse-client --user row_and_column_user --password password;
309323
```
310324

311-
5. Test with all columns:
325+
##### Test with all columns: {#test-all-columns-restricted}
312326

313327
```sql
314328
SELECT *
@@ -327,7 +341,7 @@ For example, if one `role1` allows for only select on `column1` and `role2` allo
327341
SELECT(id, column1, column2) ON db1.table1. (ACCESS_DENIED)
328342
```
329343

330-
6. Test with limited allowed columns:
344+
##### Test with limited allowed columns: {#test-limited-columns}
331345

332346
```sql
333347
SELECT
@@ -344,6 +358,7 @@ For example, if one `role1` allows for only select on `column1` and `role2` allo
344358
│ 2 │ A │
345359
└────┴─────────┘
346360
```
361+
</VerticalStepper>
347362

348363
## Troubleshooting {#troubleshooting}
349364

docs/about-us/cloud.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: /about-us/cloud
3-
sidebar_label: 'Cloud Service'
3+
sidebar_label: 'Cloud service'
44
sidebar_position: 10
55
description: 'ClickHouse Cloud'
66
title: 'ClickHouse Cloud'

docs/about-us/history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: /about-us/history
3-
sidebar_label: 'ClickHouse History'
3+
sidebar_label: 'ClickHouse history'
44
sidebar_position: 40
55
description: 'History of ClickHouse development'
66
keywords: ['history','development','Metrica']

docs/about-us/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ the table of contents below for a list of pages in this section of the docs.
1212

1313
| Page | Description |
1414
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
15-
| [What is ClickHouse](/about-clickhouse) | Introduces ClickHouse's core features, architecture, and uses, providing a concise overview for new users. |
1615
| [Adopters](/about-us/adopters) | A list of companies using ClickHouse and their success stories, assembled from public sources |
1716
| [Support](/about-us/support) | An introduction to ClickHouse Cloud support services and their mission. |
1817
| [Beta features and experimental features](/beta-and-experimental-features) | Learn about how ClickHouse uses "Beta" and "Experimental" labels to distinguish between officially supported and early-stage, unsupported features due to varied development speeds from community contributions. |

docs/about-us/intro.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/about-us/support.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ doc_type: 'reference'
99

1010
# ClickHouse Cloud support services
1111

12-
ClickHouse provides Support Services for our ClickHouse Cloud users and customers. Our objective is a Support Services team that represents the ClickHouse product – unparalleled performance, ease of use, and exceptionally fast, high-quality results. For details, [visit our ClickHouse Support Program](https://clickhouse.com/support/program/) page.
12+
ClickHouse provides support services for our ClickHouse Cloud users and customers. Our objective is a support services team that represents the ClickHouse product – unparalleled performance, ease of use, and exceptionally fast, high-quality results. For details, [visit our ClickHouse Support Program](https://clickhouse.com/support/program/) page.
1313

1414
[Login to the Cloud console](https://console.clickhouse.cloud/support) and select **Help -> Support** from the menu options to open a new support case and view the status of your submitted cases.
1515

1616
You can also subscribe to our [status page](https://status.clickhouse.com) to get notified quickly about any incidents affecting our platform.
1717

1818
:::note
19-
Please note that only Subscription Customers have a Service Level Agreement on Support Incidents. If you are not currently a ClickHouse Cloud user – while we will try to answer your question, we'd encourage you to go instead to one of our Community resources:
19+
Please note that only subscription customers have a service level agreement on support incidents. If you are not currently a ClickHouse Cloud user – while we will try to answer your question, we'd encourage you to go instead to one of our community resources:
2020

21-
- [ClickHouse Community Slack Channel](https://clickhouse.com/slack)
22-
- [Other Community Options](https://github.com/ClickHouse/ClickHouse/blob/master/README.md#useful-links)
21+
- [ClickHouse community Slack channel](https://clickhouse.com/slack)
22+
- [Other community options](https://github.com/ClickHouse/ClickHouse/blob/master/README.md#useful-links)
2323
:::

0 commit comments

Comments
 (0)