Skip to content

Commit 6fd55a5

Browse files
committed
Merge branch 'image_component' of https://github.com/ClickHouse/clickhouse-docs into image_component
2 parents d4251ff + 1677952 commit 6fd55a5

File tree

12 files changed

+150
-362
lines changed

12 files changed

+150
-362
lines changed

docs/concepts/olap.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ slug: /concepts/olap
1010

1111
[OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing) stands for Online Analytical Processing. It is a broad term that can be looked at from two perspectives: technical and business. At the highest level, you can just read these words backward:
1212

13-
Processing
14-
: Some source data is processed…
13+
**Processing** some source data is processed…
1514

16-
Analytical
17-
: …to produce some analytical reports and insights…
15+
**Analytical** …to produce some analytical reports and insights…
1816

19-
Online
20-
: …in real-time.
17+
**Online** …in real-time.
2118

2219
## OLAP from the Business Perspective {#olap-from-the-business-perspective}
2320

docs/concepts/why-clickhouse-is-so-fast.md

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

docs/deployment-modes.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This guide explores the four main ways to deploy and use ClickHouse:
2323

2424
Each deployment mode has its own strengths and ideal use cases, which we'll explore in detail below.
2525

26-
<iframe width="560" height="315" src="https://www.youtube.com/embed/EOXEW_-r10A?si=6IanDSJlRzN8f9Mo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
26+
<iframe width="1024" height="576" src="https://www.youtube.com/embed/EOXEW_-r10A?si=6IanDSJlRzN8f9Mo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
2727

2828
## ClickHouse Server {#clickhouse-server}
2929

@@ -41,9 +41,7 @@ This deployment mode is the go-to choice for production environments where relia
4141

4242
[ClickHouse Cloud](/cloud/overview) is a fully managed version of ClickHouse that removes the operational overhead of running your own deployment. While it maintains all the core capabilities of ClickHouse Server, it enhances the experience with additional features designed to streamline development and operations.
4343

44-
<img src={chCloud} alt="ClickHouse Cloud" class="image" style={{width: '50%'}} />
45-
<br/>
46-
44+
<Image img={chCloud} alt="ClickHouse Cloud" size="sm"/>
4745

4846
A key advantage of ClickHouse Cloud is its integrated tooling. [ClickPipes](/cloud/get-started/cloud-quick-start#clickpipes) provides a robust data ingestion framework, allowing you to easily connect and stream data from various sources without managing complex ETL pipelines. The platform also offers a dedicated [querying API](/cloud/get-started/query-endpoints), making it significantly easier to build applications.
4947

@@ -57,8 +55,7 @@ The managed nature of the service means you don't need to worry about updates, b
5755

5856
[clickhouse-local](/operations/utilities/clickhouse-local) is a powerful command-line tool that provides the complete functionality of ClickHouse in a standalone executable. It's essentially the same database as ClickHouse Server, but packaged in a way that lets you harness all of ClickHouse's capabilities directly from the command line without running a server instance.
5957

60-
<img src={chLocal} alt="clickhouse-local" class="image" style={{width: '50%'}} />
61-
<br/>
58+
<Image img={chLocal} alt="clickHouse-local" size="sm"/>
6259

6360
This tool excels at ad-hoc data analysis, particularly when working with local files or data stored in cloud storage services. You can directly query files in various formats (CSV, JSON, Parquet, etc.) using ClickHouse's SQL dialect, making it an excellent choice for quick data exploration or one-off analysis tasks.
6461

@@ -70,9 +67,7 @@ The combination of remote table functions and access to the local file system ma
7067

7168
[chDB](/chdb) is ClickHouse embedded as an in-process database engine,, with Python being the primary implementation, though it's also available for Go, Rust, NodeJS, and Bun. This deployment option brings ClickHouse's powerful OLAP capabilities directly into your application's process, eliminating the need for a separate database installation.
7269

73-
<img src={chDB} alt="chDB - Embedded ClickHouse" class="image" style={{width: '50%'}} />
74-
<br/>
75-
70+
<Image img={chDB} alt="chDB - Embedded ClickHouse" size="sm"/>
7671

7772
chDB provides seamless integration with your application's ecosystem. In Python, for example, it's optimized to work efficiently with common data science tools like Pandas and Arrow, minimizing data copying overhead through Python memoryview. This makes it particularly valuable for data scientists and analysts who want to leverage ClickHouse's query performance within their existing workflows.
7873

docs/guides/inserting-data.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ slug: /guides/inserting-data
77
---
88

99
import postgres_inserts from '@site/static/images/guides/postgres-inserts.png';
10+
import Image from '@theme/IdealImage';
1011

1112
## Basic Example {#basic-example}
1213

@@ -90,15 +91,7 @@ If large batches cannot be inserted, users can delegate batching to ClickHouse u
9091

9192
With asynchronous inserts, data is inserted into a buffer first and then written to the database storage later in 3 steps, as illustrated by the diagram below:
9293

93-
<br />
94-
95-
<img src={postgres_inserts}
96-
className="image"
97-
alt="NEEDS ALT"
98-
style={{width: '600px'}}
99-
/>
100-
101-
<br />
94+
<Image img={postgres_inserts} size="md" alt="Postgres inserts"/>
10295

10396
With asynchronous inserts enabled, ClickHouse:
10497

docs/migrations/bigquery/equivalent-concepts.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,31 @@ keywords: ['migrate', 'migration', 'migrating', 'data', 'etl', 'elt', 'BigQuery'
66
---
77

88
import bigquery_1 from '@site/static/images/migrations/bigquery-1.png';
9+
import Image from '@theme/IdealImage';
910

1011
# BigQuery vs ClickHouse Cloud: Equivalent and different concepts
1112

1213
## Resource organization {#resource-organization}
1314

1415
The way resources are organized in ClickHouse Cloud is similar to [BigQuery's resource hierarchy](https://cloud.google.com/bigquery/docs/resource-hierarchy). We describe specific differences below based on the following diagram showing the ClickHouse Cloud resource hierarchy:
1516

16-
<img src={bigquery_1}
17-
class="image"
18-
alt="NEEDS ALT"
19-
style={{width: '600px'}} />
20-
21-
<br />
17+
<Image img={bigquery_1} size="md" alt="Resource organizations"/>
2218

2319
### Organizations {#organizations}
2420

25-
Similar to BigQuery, organizations are the root nodes in the ClickHouse cloud resource hierarchy. The first user you set up in your ClickHouse Cloud account is automatically assigned to an organization owned by the user. The user may invite additional users to the organization.
21+
Similar to BigQuery, organizations are the root nodes in the ClickHouse cloud resource hierarchy. The first user you set up in your ClickHouse Cloud account is automatically assigned to an organization owned by the user. The user may invite additional users to the organization.
2622

2723
### BigQuery Projects vs ClickHouse Cloud Services {#bigquery-projects-vs-clickhouse-cloud-services}
2824

2925
Within organizations, you can create services loosely equivalent to BigQuery projects because stored data in ClickHouse Cloud is associated with a service. There are [several service types available](/cloud/manage/cloud-tiers) in ClickHouse Cloud. Each ClickHouse Cloud service is deployed in a specific region and includes:
3026

31-
1. A group of compute nodes (currently, 2 nodes for a Development tier service and 3 for a Production tier service). For these nodes, ClickHouse Cloud [supports vertical and horizontal scaling](/manage/scaling#how-scaling-works-in-clickhouse-cloud), both manually and automatically.
27+
1. A group of compute nodes (currently, 2 nodes for a Development tier service and 3 for a Production tier service). For these nodes, ClickHouse Cloud [supports vertical and horizontal scaling](/manage/scaling#how-scaling-works-in-clickhouse-cloud), both manually and automatically.
3228
2. An object storage folder where the service stores all the data.
3329
3. An endpoint (or multiple endpoints created via ClickHouse Cloud UI console) - a service URL that you use to connect to the service (for example, `https://dv2fzne24g.us-east-1.aws.clickhouse.cloud:8443`)
3430

3531
### BigQuery Datasets vs ClickHouse Cloud Databases {#bigquery-datasets-vs-clickhouse-cloud-databases}
3632

37-
ClickHouse logically groups tables into databases. Like BigQuery datasets, ClickHouse databases are logical containers that organize and control access to table data.
33+
ClickHouse logically groups tables into databases. Like BigQuery datasets, ClickHouse databases are logical containers that organize and control access to table data.
3834

3935
### BigQuery Folders {#bigquery-folders}
4036

@@ -77,13 +73,13 @@ ClickHouse offers more granular precision with respect to numerics. For example,
7773
| [TIME](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#time_type) | [DateTime64](/sql-reference/data-types/datetime64) |
7874
| [TIMESTAMP](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type) | [DateTime64](/sql-reference/data-types/datetime64) |
7975

80-
When presented with multiple options for ClickHouse types, consider the actual range of the data and pick the lowest required. Also, consider utilizing [appropriate codecs](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema) for further compression.
76+
When presented with multiple options for ClickHouse types, consider the actual range of the data and pick the lowest required. Also, consider utilizing [appropriate codecs](https://clickhouse.com/blog/optimize-clickhouse-codecs-compression-schema) for further compression.
8177

8278
## Query acceleration techniques {#query-acceleration-techniques}
8379

8480
### Primary and Foreign keys and Primary index {#primary-and-foreign-keys-and-primary-index}
8581

86-
In BigQuery, a table can have [primary key and foreign key constraints](https://cloud.google.com/bigquery/docs/information-schema-table-constraints). Typically, primary and foreign keys are used in relational databases to ensure data integrity. A primary key value is normally unique for each row and is not `NULL`. Each foreign key value in a row must be present in the primary key column of the primary key table or be `NULL`. In BigQuery, these constraints are not enforced, but the query optimizer may use this information to optimize queries better.
82+
In BigQuery, a table can have [primary key and foreign key constraints](https://cloud.google.com/bigquery/docs/information-schema-table-constraints). Typically, primary and foreign keys are used in relational databases to ensure data integrity. A primary key value is normally unique for each row and is not `NULL`. Each foreign key value in a row must be present in the primary key column of the primary key table or be `NULL`. In BigQuery, these constraints are not enforced, but the query optimizer may use this information to optimize queries better.
8783

8884
In ClickHouse, a table can also have a primary key. Like BigQuery, ClickHouse doesn't enforce uniqueness for a table's primary key column values. Unlike BigQuery, a table's data is stored on disk [ordered](/guides/best-practices/sparse-primary-indexes#optimal-compression-ratio-of-data-files) by the primary key column(s). The query optimizer utilizes this sort order to prevent resorting, to minimize memory usage for joins, and to enable short-circuiting for limit clauses. Unlike BigQuery, ClickHouse automatically creates [a (sparse) primary index](/guides/best-practices/sparse-primary-indexes#an-index-design-for-massive-data-scales) based on the primary key column values. This index is used to speed up all queries that contain filters on the primary key columns. ClickHouse currently doesn't support foreign key constraints.
8985

@@ -102,7 +98,7 @@ In addition to the primary index created from the values of a table's primary ke
10298

10399
## Search indexes {#search-indexes}
104100

105-
Similar to [search indexes](https://cloud.google.com/bigquery/docs/search-index) in BigQuery, [full-text indexes](/engines/table-engines/mergetree-family/invertedindexes) can be created for ClickHouse tables on columns with string values.
101+
Similar to [search indexes](https://cloud.google.com/bigquery/docs/search-index) in BigQuery, [full-text indexes](/engines/table-engines/mergetree-family/invertedindexes) can be created for ClickHouse tables on columns with string values.
106102

107103
## Vector indexes {#vector-indexes}
108104

@@ -120,7 +116,7 @@ In ClickHouse, data is automatically [clustered on disk](/guides/best-practices/
120116

121117
## Materialized views {#materialized-views}
122118

123-
Both BigQuery and ClickHouse support materialized views – precomputed results based on a transformation query's result against a base table for increased performance and efficiency.
119+
Both BigQuery and ClickHouse support materialized views – precomputed results based on a transformation query's result against a base table for increased performance and efficiency.
124120

125121
## Querying materialized views {#querying-materialized-views}
126122

@@ -160,9 +156,9 @@ ClickHouse provides standard SQL with many extensions and improvements that make
160156

161157
Compared to BigQuery's 8 array functions, ClickHouse has over 80 [built-in array functions](/sql-reference/functions/array-functions) for modeling and solving a wide range of problems elegantly and simply.
162158

163-
A typical design pattern in ClickHouse is to use the [`groupArray`](/sql-reference/aggregate-functions/reference/grouparray) aggregate function to (temporarily) transform specific row values of a table into an array. This then can be conveniently processed via array functions, and the result can be converted back into individual table rows via [`arrayJoin`](/sql-reference/functions/array-join) aggregate function.
159+
A typical design pattern in ClickHouse is to use the [`groupArray`](/sql-reference/aggregate-functions/reference/grouparray) aggregate function to (temporarily) transform specific row values of a table into an array. This then can be conveniently processed via array functions, and the result can be converted back into individual table rows via [`arrayJoin`](/sql-reference/functions/array-join) aggregate function.
164160

165-
Because ClickHouse SQL supports [higher order lambda functions](/sql-reference/functions/overview#arrow-operator-and-lambda), many advanced array operations can be achieved by simply calling one of the higher order built-in array functions, instead of temporarily converting arrays back to tables, as it is often [required](https://cloud.google.com/bigquery/docs/arrays) in BigQuery, e.g. for [filtering](https://cloud.google.com/bigquery/docs/arrays#filtering_arrays) or [zipping](https://cloud.google.com/bigquery/docs/arrays#zipping_arrays) arrays. In ClickHouse these operations are just a simple function call of the higher order functions [`arrayFilter`](/sql-reference/functions/array-functions#arrayfilterfunc-arr1-), and [`arrayZip`](/sql-reference/functions/array-functions#arrayzip), respectively.
161+
Because ClickHouse SQL supports [higher order lambda functions](/sql-reference/functions/overview#arrow-operator-and-lambda), many advanced array operations can be achieved by simply calling one of the higher order built-in array functions, instead of temporarily converting arrays back to tables, as it is often [required](https://cloud.google.com/bigquery/docs/arrays) in BigQuery, e.g. for [filtering](https://cloud.google.com/bigquery/docs/arrays#filtering_arrays) or [zipping](https://cloud.google.com/bigquery/docs/arrays#zipping_arrays) arrays. In ClickHouse these operations are just a simple function call of the higher order functions [`arrayFilter`](/sql-reference/functions/array-functions#arrayfilterfunc-arr1-), and [`arrayZip`](/sql-reference/functions/array-functions#arrayzip), respectively.
166162

167163
In the following, we provide a mapping of array operations from BigQuery to ClickHouse:
168164

@@ -326,7 +322,7 @@ Query id: b324c11f-655b-479f-9337-f4d34fd02190
326322

327323
_BigQuery_
328324

329-
Requires temporarily converting arrays back to tables via [`UNNEST`](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) operator
325+
Requires temporarily converting arrays back to tables via [`UNNEST`](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) operator
330326

331327
```sql
332328
WITH Sequences AS

0 commit comments

Comments
 (0)