Skip to content

Commit e93e502

Browse files
authored
Merge pull request #3267 from Blargian/fix_code_blocks
Fix code blocks
2 parents ac54996 + 63b3b86 commit e93e502

Some content is hidden

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

48 files changed

+198
-161
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Roles are used to define groups of users for certain privileges instead of manag
170170

171171
1. Log into the clickhouse client using the `clickhouse_admin` user
172172

173-
```
173+
```bash
174174
clickhouse-client --user clickhouse_admin --password password
175175
```
176176

@@ -194,7 +194,7 @@ Roles are used to define groups of users for certain privileges instead of manag
194194

195195
3. Log into the ClickHouse client using the `column_user` user
196196

197-
```
197+
```bash
198198
clickhouse-client --user column_user --password password
199199
```
200200

@@ -245,7 +245,7 @@ Roles are used to define groups of users for certain privileges instead of manag
245245

246246
1. Log into the ClickHouse client using `row_user`
247247

248-
```
248+
```bash
249249
clickhouse-client --user row_user --password password
250250
```
251251

@@ -295,7 +295,7 @@ For example, if one `role1` allows for only select on `column1` and `role2` allo
295295

296296
4. Log into the ClickHouse client using `row_and_column_user`
297297

298-
```
298+
```bash
299299
clickhouse-client --user row_and_column_user --password password;
300300
```
301301

docs/en/chdb/guides/clickhouse-local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ from chdb import session as chs
9898

9999
Initialize a session pointing to `demo..chdb`:
100100

101-
```
101+
```python
102102
sess = chs.Session("demo.chdb")
103103
```
104104

docs/en/chdb/guides/querying-pandas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ from chdb import session as chs
321321

322322
Initialize a session:
323323

324-
```
324+
```python
325325
sess = chs.Session()
326326
```
327327

docs/en/cloud/manage/account-close.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ below.
3939
3. Click the Help button (question mark in the upper right corner of the screen).
4040
4. Under 'Support' click 'Create case.'
4141
5. In the 'Create new case' screen, enter the following:
42-
```
42+
43+
```text
4344
Priority: Severity 3
4445
Subject: Please close my ClickHouse account
4546
Description: We would appreciate it if you would share a brief note about why you are cancelling.
4647
```
48+
4749
5. Click 'Create new case'
4850
6. We will close your account and send a confirmation email to let you know when it is complete.
4951

docs/en/cloud/security/accessing-s3-data-securely.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Trust policy (Please replace `{ClickHouse_IAM_ARN}` with the IAM Role arn belon
9292

9393
IAM policy (Please replace `{BUCKET_NAME}` with your bucket name):
9494

95-
```
95+
```json
9696
{
9797
"Version": "2012-10-17",
9898
"Statement": [
@@ -126,15 +126,15 @@ IAM policy (Please replace `{BUCKET_NAME}` with your bucket name):
126126

127127
ClickHouse Cloud has a new feature that allows you to specify `extra_credentials` as part of the S3 table function. Below is an example of how to run a query using the newly created role copied from above.
128128

129-
```
130-
describe table s3('https://s3.amazonaws.com/BUCKETNAME/BUCKETOBJECT.csv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001'))
129+
```sql
130+
DESCRIBE TABLE s3('https://s3.amazonaws.com/BUCKETNAME/BUCKETOBJECT.csv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001'))
131131
```
132132

133133

134134
Below is an example query that uses the `role_session_name` as a shared secret to query data from a bucket. If the `role_session_name` is not correct, this operation will fail.
135135

136-
```
137-
describe table s3('https://s3.amazonaws.com/BUCKETNAME/BUCKETOBJECT.csv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001', role_session_name = 'secret-role-name'))
136+
```sql
137+
DESCRIBE TABLE s3('https://s3.amazonaws.com/BUCKETNAME/BUCKETOBJECT.csv','CSVWithNames',extra_credentials(role_arn = 'arn:aws:iam::111111111111:role/ClickHouseAccessRole-001', role_session_name = 'secret-role-name'))
138138
```
139139

140140
:::note

docs/en/cloud/security/cloud-access-management/cloud-access-management.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To change the password assigned to the `default` account in the console, go to t
4040

4141
We recommend creating a new user account associated with a person and granting the user the default_role. This is so activities performed by users are identified to their user IDs and the `default` account is reserved for break-glass type activities.
4242

43-
```
43+
```sql
4444
CREATE USER userID IDENTIFIED WITH sha256_hash by 'hashed_password';
4545
GRANT default_role to userID;
4646
```
@@ -88,7 +88,7 @@ Custom roles may be created and associated with SQL console users. Since SQL con
8888
To create a custom role for a SQL console user and grant it a general role, run the following commands. The email address must match the user's email address in the console.
8989
1. Create the database_developer role and grant SHOW, CREATE, ALTER, and DELETE permissions.
9090

91-
```
91+
```sql
9292
CREATE ROLE OR REPLACE database_developer;
9393
GRANT SHOW ON * TO database_developer;
9494
GRANT CREATE ON * TO database_developer;
@@ -98,14 +98,14 @@ GRANT DELETE ON * TO database_developer;
9898

9999
2. Create a role for the SQL console user [email protected] and assign it the database_developer role.
100100

101-
```
101+
```sql
102102
CREATE ROLE OR REPLACE `sql-console-role:[email protected]`;
103103
GRANT database_developer TO `sql-console-role:[email protected]`;
104104
```
105105

106106
When using this role construction, the query to show user access needs to be modified to include the role-to-role grant when the user is not present.
107107

108-
```
108+
```sql
109109
SELECT grants.user_name,
110110
grants.role_name,
111111
users.name AS role_member,

docs/en/cloud/security/cloud-access-management/cloud-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@ Use the SHA256_hash method when [creating user accounts](/docs/en/sql-reference/
124124
**TIP:** Since users with less than administrative privileges cannot set their own password, ask the user to hash their password using a generator
125125
such as [this one](https://tools.keycdn.com/sha256-online-generator) before providing it to the admin to setup the account. Passwords should follow the [requirements](#password-settings) listed above.
126126

127-
```
127+
```sql
128128
CREATE USER userName IDENTIFIED WITH sha256_hash BY 'hash';
129129
```

docs/en/cloud/security/cloud-endpoints-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ If you are using an integration like the MySQL or PostgreSQL Engine, it is possi
101101

102102
For example, to allow access from a ClickHouse Cloud service hosted on AWS in the region `ap-south-1`, you can add the `egress_ips` addresses for that region:
103103

104-
```
104+
```bash
105105
❯ curl -s https://api.clickhouse.cloud/static-ips.json | jq '.'
106106
{
107107
"aws": [

docs/en/data-modeling/schema-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Applying the above guidelines to our `posts` table, let's assume that our users
233233

234234
The query for this question using our earlier `posts_v2` table with optimized types but no ordering key:
235235

236-
```
236+
```sql
237237
SELECT
238238
Id,
239239
Title,

docs/en/deployment-guides/horizontal-scaling.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -371,20 +371,24 @@ As `chnode3` is not storing data and is only used for ClickHouse Keeper to provi
371371
## Testing
372372

373373
1. Connect to `chnode1` and verify that the cluster `cluster_2S_1R` configured above exists
374-
```sql
374+
375+
```sql title="Query"
375376
SHOW CLUSTERS
376377
```
377-
```response
378+
379+
```response title="Response"
378380
┌─cluster───────┐
379381
│ cluster_2S_1R │
380382
└───────────────┘
381383
```
382384

383385
2. Create a database on the cluster
384-
```sql
386+
387+
```sql title="Query"
385388
CREATE DATABASE db1 ON CLUSTER cluster_2S_1R
386389
```
387-
```response
390+
391+
```response title="Response"
388392
┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
389393
│ chnode2 │ 9000 │ 0 │ │ 1 │ 0 │
390394
│ chnode1 │ 9000 │ 0 │ │ 0 │ 0 │
@@ -396,7 +400,7 @@ CREATE DATABASE db1 ON CLUSTER cluster_2S_1R
396400
We do not need not to specify parameters on the table engine since these will be automatically defined based on our macros
397401
:::
398402

399-
```sql
403+
```sql title="Query"
400404
CREATE TABLE db1.table1 ON CLUSTER cluster_2S_1R
401405
(
402406
`id` UInt64,
@@ -405,30 +409,33 @@ CREATE TABLE db1.table1 ON CLUSTER cluster_2S_1R
405409
ENGINE = MergeTree
406410
ORDER BY id
407411
```
408-
```response
412+
```response title="Response"
409413
┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
410414
│ chnode1 │ 9000 │ 0 │ │ 1 │ 0 │
411415
│ chnode2 │ 9000 │ 0 │ │ 0 │ 0 │
412416
└─────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
413417
```
414418

415419
4. Connect to `chnode1` and insert a row
416-
```sql
420+
421+
```sql title="Query"
417422
INSERT INTO db1.table1 (id, column1) VALUES (1, 'abc');
418423
```
419424

420425
5. Connect to `chnode2` and insert a row
421426

422-
```sql
427+
```sql title="Query"
423428
INSERT INTO db1.table1 (id, column1) VALUES (2, 'def');
424429
```
425430

426431
6. Connect to either node, `chnode1` or `chnode2` and you will see only the row that was inserted into that table on that node.
427432
for example, on `chnode2`
428-
```sql
433+
434+
```sql title="Query"
429435
SELECT * FROM db1.table1;
430436
```
431-
```response
437+
438+
```response title="Response"
432439
┌─id─┬─column1─┐
433440
│ 2 │ def │
434441
└────┴─────────┘
@@ -437,26 +444,30 @@ SELECT * FROM db1.table1;
437444

438445
7. Create a distributed table to query both shards on both nodes.
439446
(In this example, the `rand()` function is set as the sharding key so that it randomly distributes each insert)
440-
```sql
447+
448+
```sql title="Query"
441449
CREATE TABLE db1.table1_dist ON CLUSTER cluster_2S_1R
442450
(
443451
`id` UInt64,
444452
`column1` String
445453
)
446454
ENGINE = Distributed('cluster_2S_1R', 'db1', 'table1', rand())
447455
```
448-
```response
456+
457+
```response title="Response"
449458
┌─host────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
450459
│ chnode2 │ 9000 │ 0 │ │ 1 │ 0 │
451460
│ chnode1 │ 9000 │ 0 │ │ 0 │ 0 │
452461
└─────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
453462
```
454463

455464
8. Connect to either `chnode1` or `chnode2` and query the distributed table to see both rows.
456-
```
465+
466+
```sql title="Query"
457467
SELECT * FROM db1.table1_dist;
458468
```
459-
```reponse
469+
470+
```reponse title="Response"
460471
┌─id─┬─column1─┐
461472
│ 2 │ def │
462473
└────┴─────────┘

0 commit comments

Comments
 (0)