You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`HOST` and `PORT`| Typically, the port is 8443 when using TLS or 8123 when not using TLS. |
10
+
|`DATABASE NAME`| Out of the box, there is a database named `default`, use the name of the database that you want to connect to.|
11
+
|`USERNAME` and `PASSWORD`| Out of the box, the username is `default`. Use the username appropriate for your use case. |
8
12
9
-
- The DATABASE NAME: out of the box, there is a database named `default`, use the name of the database that you want to connect to.
10
-
11
-
- The USERNAME and PASSWORD: out of the box, the username is `default`. Use the username appropriate for your use case.
12
-
13
-
The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console. Select the service that you will connect to and click **Connect**:
13
+
The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console.
14
+
Select a service and click **Connect**:
14
15
15
16
<Imageimg={cloud_connect_button}size="md"alt="ClickHouse Cloud service connect button"border />
16
17
17
-
Choose **HTTPS**, and the details are available in an example `curl` command.
18
+
Choose **HTTPS**. Connection details are displayed in an example `curl` command.
Copy file name to clipboardExpand all lines: docs/_snippets/_gather_your_details_native.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,14 @@ import Image from '@theme/IdealImage';
4
4
5
5
To connect to ClickHouse with native TCP you need this information:
6
6
7
-
- The HOST and PORT: typically, the port is 9440 when using TLS, or 9000 when not using TLS.
8
-
9
-
- The DATABASE NAME: out of the box there is a database named `default`, use the name of the database that you want to connect to.
10
-
11
-
- The USERNAME and PASSWORD: out of the box the username is `default`. Use the username appropriate for your use case.
12
-
13
-
The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console. Select the service that you will connect to and click **Connect**:
Copy file name to clipboardExpand all lines: docs/integrations/data-ingestion/etl-tools/airbyte-and-clickhouse.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,9 @@ Please note that the Airbyte source and destination for ClickHouse are currently
34
34
35
35
<ahref="https://www.airbyte.com/"target="_blank">Airbyte</a> is an open-source data integration platform. It allows the creation of <ahref="https://airbyte.com/blog/why-the-future-of-etl-is-not-elt-but-el"target="_blank">ELT</a> data pipelines and is shipped with more than 140 out-of-the-box connectors. This step-by-step tutorial shows how to connect Airbyte to ClickHouse as a destination and load a sample dataset.
36
36
37
-
## 1. Download and run Airbyte {#1-download-and-run-airbyte}
37
+
<VerticalStepperheaderLevel="h2">
38
+
39
+
## Download and run Airbyte {#1-download-and-run-airbyte}
38
40
39
41
1. Airbyte runs on Docker and uses `docker-compose`. Make sure to download and install the latest versions of Docker.
40
42
@@ -54,7 +56,7 @@ Please note that the Airbyte source and destination for ClickHouse are currently
54
56
Alternatively, you can signup and use <a href="https://docs.airbyte.com/deploying-airbyte/on-cloud" target="_blank">Airbyte Cloud</a>
55
57
:::
56
58
57
-
## 2. Add ClickHouse as a destination {#2-add-clickhouse-as-a-destination}
59
+
## Add ClickHouse as a destination {#2-add-clickhouse-as-a-destination}
58
60
59
61
In this section, we will display how to add a ClickHouse instance as a destination.
60
62
@@ -84,7 +86,7 @@ GRANT CREATE ON * TO my_airbyte_user;
84
86
```
85
87
:::
86
88
87
-
## 3. Add a dataset as a source {#3-add-a-dataset-as-a-source}
89
+
## Add a dataset as a source {#3-add-a-dataset-as-a-source}
88
90
89
91
The example dataset we will use is the <a href="https://clickhouse.com/docs/getting-started/example-datasets/nyc-taxi/" target="_blank">New York City Taxi Data</a> (on <a href="https://github.com/toddwschneider/nyc-taxi-data" target="_blank">Github</a>). For this tutorial, we will use a subset of this dataset which corresponds to the month of Jan 2022.
90
92
@@ -102,7 +104,7 @@ The example dataset we will use is the <a href="https://clickhouse.com/docs/gett
102
104
103
105
3. Congratulations! You have now added a source file in Airbyte.
104
106
105
-
## 4. Create a connection and load the dataset into ClickHouse {#4-create-a-connection-and-load-the-dataset-into-clickhouse}
107
+
## Create a connection and load the dataset into ClickHouse {#4-create-a-connection-and-load-the-dataset-into-clickhouse}
106
108
107
109
1. Within Airbyte, selectthe"Connections" page and add a new connection
108
110
@@ -174,3 +176,5 @@ The example dataset we will use is the <a href="https://clickhouse.com/docs/gett
174
176
Now that the dataset is loaded on your ClickHouse instance, you can create an new table and use more suitable ClickHouse data types (<a href="https://clickhouse.com/docs/getting-started/example-datasets/nyc-taxi/" target="_blank">more details</a>).
175
177
176
178
8. Congratulations - you have successfully loaded the NYC taxi data into ClickHouse using Airbyte!
To load data into ClickHouse, you need to create a ClickHouse database. Here's a rough outline of what should you do:
48
50
@@ -60,7 +62,7 @@ GRANT SELECT ON INFORMATION_SCHEMA.COLUMNS TO dlt;
60
62
GRANT CREATE TEMPORARY TABLE, S3 ON *.* TO dlt;
61
63
```
62
64
63
-
### 3. Add credentials {#3-add-credentials}
65
+
### Add credentials {#3-add-credentials}
64
66
65
67
Next, set up the ClickHouse credentials in the `.dlt/secrets.toml` file as shown below:
66
68
@@ -78,8 +80,7 @@ secure = 1 # Set to 1 if using HTTPS, else 0.
78
80
dataset_table_separator = "___"# Separator for dataset table names from dataset.
79
81
```
80
82
81
-
:::note
82
-
HTTP_PORT
83
+
:::note HTTP_PORT
83
84
The `http_port` parameter specifies the port number to use when connecting to the ClickHouse server's HTTP interface. This is different from default port 9000, which is used for the native TCP protocol.
84
85
85
86
You must set `http_port` if you are not using external staging (i.e. you don't set the staging parameter in your pipeline). This is because the built-in ClickHouse local storage staging uses the <ahref="https://github.com/ClickHouse/clickhouse-connect">clickhouse content</a> library, which communicates with ClickHouse over HTTP.
@@ -94,6 +95,8 @@ You can pass a database connection string similar to the one used by the `clickh
Copy file name to clipboardExpand all lines: docs/integrations/data-ingestion/etl-tools/nifi-and-clickhouse.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,20 +36,23 @@ import CommunityMaintainedBadge from '@theme/badges/CommunityMaintained';
36
36
37
37
<ahref="https://nifi.apache.org/"target="_blank">Apache NiFi</a> is an open-source workflow management software designed to automate data flow between software systems. It allows the creation of ETL data pipelines and is shipped with more than 300 data processors. This step-by-step tutorial shows how to connect Apache NiFi to ClickHouse as both a source and destination, and to load a sample dataset.
38
38
39
-
## 1. Gather your connection details {#1-gather-your-connection-details}
39
+
<VerticalStepperheaderLevel="h2">
40
+
41
+
## Gather your connection details {#1-gather-your-connection-details}
42
+
40
43
<ConnectionDetails />
41
44
42
-
## 2. Download and run Apache NiFi {#2-download-and-run-apache-nifi}
45
+
## Download and run Apache NiFi {#2-download-and-run-apache-nifi}
43
46
44
-
1.For a new setup, download the binary from https://nifi.apache.org/download.html and start by running `./bin/nifi.sh start`
47
+
For a new setup, download the binary from https://nifi.apache.org/download.html and start by running `./bin/nifi.sh start`
45
48
46
-
## 3. Download the ClickHouse JDBC driver {#3-download-the-clickhouse-jdbc-driver}
49
+
## Download the ClickHouse JDBC driver {#3-download-the-clickhouse-jdbc-driver}
47
50
48
51
1. Visit the <ahref="https://github.com/ClickHouse/clickhouse-java/releases"target="_blank">ClickHouse JDBC driver release page</a> on GitHub and look for the latest JDBC release version
49
52
2. In the release version, click on "Show all xx assets" and look for the JAR file containing the keyword "shaded" or "all", for example, `clickhouse-jdbc-0.5.0-all.jar`
50
53
3. Place the JAR file in a folder accessible by Apache NiFi and take note of the absolute path
51
54
52
-
## 4. Add `DBCPConnectionPool` Controller Service and configure its properties {#4-add-dbcpconnectionpool-controller-service-and-configure-its-properties}
55
+
## Add `DBCPConnectionPool` Controller Service and configure its properties {#4-add-dbcpconnectionpool-controller-service-and-configure-its-properties}
53
56
54
57
1. To configure a Controller Service in Apache NiFi, visit the NiFi Flow Configuration page by clicking on the "gear" button
55
58
@@ -93,7 +96,7 @@ import CommunityMaintainedBadge from '@theme/badges/CommunityMaintained';
93
96
94
97
<Imageimg={nifi08}size="lg"borderalt="Controller Services list showing enabled ClickHouse JDBC service" />
95
98
96
-
## 5. Read from a table using the `ExecuteSQL` processor {#5-read-from-a-table-using-the-executesql-processor}
99
+
## Read from a table using the `ExecuteSQL` processor {#5-read-from-a-table-using-the-executesql-processor}
97
100
98
101
1. Add an `ExecuteSQL` processor, along with the appropriate upstream and downstream processors
99
102
@@ -118,7 +121,7 @@ import CommunityMaintainedBadge from '@theme/badges/CommunityMaintained';
118
121
119
122
<Imageimg={nifi12}size="lg"borderalt="FlowFile content viewer showing query results in formatted view" />
120
123
121
-
## 6. Write to a table using `MergeRecord` and `PutDatabaseRecord` processor {#6-write-to-a-table-using-mergerecord-and-putdatabaserecord-processor}
124
+
## Write to a table using `MergeRecord` and `PutDatabaseRecord` processor {#6-write-to-a-table-using-mergerecord-and-putdatabaserecord-processor}
122
125
123
126
1. To write multiple rows in a single insert, we first need to merge multiple records into a single record. This can be done using the `MergeRecord` processor
124
127
@@ -156,3 +159,5 @@ import CommunityMaintainedBadge from '@theme/badges/CommunityMaintained';
156
159
<Imageimg={nifi15}size="sm"borderalt="Query results showing row count in the destination table" />
157
160
158
161
5. Congratulations - you have successfully loaded your data into ClickHouse using Apache NiFi !
0 commit comments