Skip to content

Commit f67f381

Browse files
committed
integrations
1 parent 1cbcde5 commit f67f381

File tree

25 files changed

+224
-196
lines changed

25 files changed

+224
-196
lines changed

docs/integrations/data-ingestion/clickpipes/postgres/source/supabase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Head over to your Supabase Project's `Project Settings` -> `Database` (under `Co
7373

7474
**Important**: Disable `Display connection pooler` on this page and head over to the `Connection parameters` section and note/copy the parameters.
7575

76-
<img src={supabase_connection_details} alt="Locate Supabase Connection Details"/>
76+
<Image img={supabase_connection_details} size="lg" border alt="Locate Supabase Connection Details"/>
7777

7878
:::info
7979

docs/integrations/data-ingestion/dbms/jdbc-with-clickhouse.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ description: 'The ClickHouse JDBC Bridge allows ClickHouse to access data from a
77
title: 'Connecting ClickHouse to external data sources with JDBC'
88
---
99

10+
import Image from '@theme/IdealImage';
1011
import Tabs from '@theme/Tabs';
1112
import TabItem from '@theme/TabItem';
1213
import Jdbc01 from '@site/static/images/integrations/data-ingestion/dbms/jdbc-01.png';
@@ -21,7 +22,7 @@ Using JDBC requires the ClickHouse JDBC bridge, so you will need to use `clickho
2122

2223
**Overview:** The <a href="https://github.com/ClickHouse/clickhouse-jdbc-bridge" target="_blank">ClickHouse JDBC Bridge</a> in combination with the [jdbc table function](/sql-reference/table-functions/jdbc.md) or the [JDBC table engine](/engines/table-engines/integrations/jdbc.md) allows ClickHouse to access data from any external data source for which a <a href="https://en.wikipedia.org/wiki/JDBC_driver" target="_blank">JDBC driver</a> is available:
2324

24-
<img src={Jdbc01} class="image" alt="ClickHouse JDBC Bridge"/>
25+
<Image img={Jdbc01} size="lg" alt="ClickHouse JDBC Bridge architecture diagram" background='white'/>
2526
This is handy when there is no native built-in [integration engine](/engines/table-engines/integrations), table function, or external dictionary for the external data source available, but a JDBC driver for the data source exists.
2627

2728
You can use the ClickHouse JDBC Bridge for both reads and writes. And in parallel for multiple external data sources, e.g. you can run distributed queries on ClickHouse across multiple external and internal data sources in real time.
@@ -41,7 +42,7 @@ You have access to a machine that has:
4142

4243
## Install the ClickHouse JDBC Bridge locally {#install-the-clickhouse-jdbc-bridge-locally}
4344

44-
The easiest way to use the ClickHouse JDBC Bridge is to install and run it on the same host where also ClickHouse is running:<img src={Jdbc02} class="image" alt="ClickHouse JDBC Bridge locally"/>
45+
The easiest way to use the ClickHouse JDBC Bridge is to install and run it on the same host where also ClickHouse is running:<Image img={Jdbc02} size="lg" alt="ClickHouse JDBC Bridge locally deployment diagram" background='white'/>
4546

4647
Let's start by connecting to the Unix shell on the machine where ClickHouse is running and create a local folder where we will later install the ClickHouse JDBC Bridge into (feel free to name the folder anything you like and put it anywhere you like):
4748
```bash
@@ -142,7 +143,7 @@ As the first parameter for the jdbc table function we are using the name of the
142143
## Install the ClickHouse JDBC Bridge externally {#install-the-clickhouse-jdbc-bridge-externally}
143144

144145
For a distributed ClickHouse cluster (a cluster with more than one ClickHouse host) it makes sense to install and run the ClickHouse JDBC Bridge externally on its own host:
145-
<img src={Jdbc03} class="image" alt="ClickHouse JDBC Bridge externally"/>
146+
<Image img={Jdbc03} size="lg" alt="ClickHouse JDBC Bridge external deployment diagram" background='white'/>
146147
This has the advantage that each ClickHouse host can access the JDBC Bridge. Otherwise the JDBC Bridge would need to be installed locally for each ClickHouse instance that is supposed to access external data sources via the Bridge.
147148

148149
In order to install the ClickHouse JDBC Bridge externally, we do the following steps:

docs/integrations/data-ingestion/emqx/index.md

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import mqttx_new from '@site/static/images/integrations/data-ingestion/emqx/mqtt
3232
import mqttx_publish from '@site/static/images/integrations/data-ingestion/emqx/mqttx-publish.png';
3333
import rule_monitor from '@site/static/images/integrations/data-ingestion/emqx/rule_monitor.png';
3434
import clickhouse_result from '@site/static/images/integrations/data-ingestion/emqx/clickhouse_result.png';
35+
import Image from '@theme/IdealImage';
3536

3637
# Integrating EMQX with ClickHouse
3738

@@ -43,7 +44,7 @@ import clickhouse_result from '@site/static/images/integrations/data-ingestion/e
4344

4445
With the infrastructure provided by cloud providers, EMQX Cloud serves dozens of countries and regions around the world, providing low-cost, secure, and reliable cloud services for 5G and Internet of Everything applications.
4546

46-
<img src={emqx_cloud_artitecture} alt="EMQX Cloud Architecture" />
47+
<Image img={emqx_cloud_artitecture} size="lg" border alt="EMQX Cloud Architecture diagram showing cloud infrastructure components" />
4748

4849
### Assumptions {#assumptions}
4950

@@ -53,27 +54,27 @@ With the infrastructure provided by cloud providers, EMQX Cloud serves dozens of
5354
* We are using [MQTT X](https://mqttx.app/) as an MQTT client testing tool to connect the deployment of EMQX Cloud to publish MQTT data. Or other methods connecting to the MQTT broker will do the job as well.
5455

5556

56-
## Get Your ClickHouse Cloud Service {#get-your-clickhouse-cloudservice}
57+
## Get Your ClickHouse Cloud Service {#get-your-clickhouse-cloudservice}
5758

5859
During this setup, we deployed the ClickHouse instance on AWS in N. Virginia (us-east -1), while an EMQX Cloud instance was also deployed in the same region.
5960

60-
<img src={clickhouse_cloud_1} alt="ClickHouse Cloud Service Deployment" />
61+
<Image img={clickhouse_cloud_1} size="sm" border alt="ClickHouse Cloud Service Deployment interface showing AWS region selection" />
6162

6263
During the setup process, you will also need to pay attention to the connection settings. In this tutorial, we choose "Anywhere", but if you apply for a specific location, you will need to add the [NAT gateway](https://docs.emqx.com/en/cloud/latest/vas/nat-gateway.html) IP address you got from your EMQX Cloud deployment to the whitelist.
6364

64-
<img src={clickhouse_cloud_2} alt="ClickHouse Cloud Connection Settings" />
65+
<Image img={clickhouse_cloud_2} size="sm" border alt="ClickHouse Cloud Connection Settings showing IP access configuration" />
6566

6667
Then you need to save your username and password for future use.
6768

68-
<img src={clickhouse_cloud_3} alt="ClickHouse Cloud Credentials" />
69+
<Image img={clickhouse_cloud_3} size="sm" border alt="ClickHouse Cloud Credentials screen showing username and password" />
6970

7071
After that, you will get a running Click house instance. Click "Connect" to get the instance connection address of Clickhouse Cloud.
7172

72-
<img src={clickhouse_cloud_4} alt="ClickHouse Cloud Running Instance" />
73+
<Image img={clickhouse_cloud_4} size="lg" border alt="ClickHouse Cloud Running Instance dashboard with connection options" />
7374

7475
Click "Connect to SQL Console" to create database and table for integration with EMQX Cloud.
7576

76-
<img src={clickhouse_cloud_5} alt="ClickHouse Cloud SQL Console" />
77+
<Image img={clickhouse_cloud_5} size="lg" border alt="ClickHouse Cloud SQL Console interface" />
7778

7879
You can refer to the following SQL statement, or modify the SQL according to the actual situation.
7980

@@ -90,7 +91,7 @@ ENGINE = MergeTree()
9091
PRIMARY KEY (client_id, timestamp)
9192
```
9293

93-
<img src={clickhouse_cloud_6} alt="ClickHouse Cloud Create Database and Table" />
94+
<Image img={clickhouse_cloud_6} size="lg" border alt="ClickHouse Cloud Create Database and Table SQL query execution" />
9495

9596
## Create an MQTT service on EMQX Cloud {#create-an-mqtt-service-on-emqx-cloud}
9697

@@ -102,41 +103,41 @@ EMQX Cloud provides a 14-day free trial for both standard deployment and profess
102103

103104
Start at the [EMQX Cloud sign up](https://accounts.emqx.com/signup?continue=https%3A%2F%2Fwww.emqx.com%2Fen%2Fcloud) page and click start free to register an account if you are new to EMQX Cloud.
104105

105-
<img src={emqx_cloud_sign_up} alt="EMQX Cloud Signup Page" />
106+
<Image img={emqx_cloud_sign_up} size="lg" border alt="EMQX Cloud Signup Page with registration form" />
106107

107108
### Create an MQTT cluster {#create-an-mqtt-cluster}
108109

109110
Once logged in, click on "Cloud Console" under the account menu and you will be able to see the green button to create a new deployment.
110111

111-
<img src={emqx_cloud_create_1} alt="EMQX Cloud Create Deployment Step 1" />
112+
<Image img={emqx_cloud_create_1} size="lg" border alt="EMQX Cloud Create Deployment Step 1 showing deployment options" />
112113

113114
In this tutorial, we will use the Professional deployment because only Pro version provides the data integration functionality, which can send MQTT data directly to ClickHouse without a single line of code.
114115

115-
Select Pro version and choose `N.Virginial` region and click `Create Now`. In just a few minutes, you will get a fully managed MQTT broker:
116+
Select Pro version and choose `N.Virginial` region and click `Create Now`. In just a few minutes, you will get a fully managed MQTT broker:
116117

117-
<img src={emqx_cloud_create_2} alt="EMQX Cloud Create Deployment Step 2" />
118+
<Image img={emqx_cloud_create_2} size="lg" border alt="EMQX Cloud Create Deployment Step 2 showing region selection" />
118119

119120
Now click the panel to go to the cluster view. On this dashboard, you will see the overview of your MQTT broker.
120121

121-
<img src={emqx_cloud_overview} alt="EMQX Cloud Overview Dashboard" />
122+
<Image img={emqx_cloud_overview} size="lg" border alt="EMQX Cloud Overview Dashboard showing broker metrics" />
122123

123124
### Add Client Credential {#add-client-credential}
124125

125126
EMQX Cloud does not allow anonymous connections by default,so you need add a client credential so you can use the MQTT client tool to send data to this broker.
126127

127128
Click ‘Authentication & ACL’ on the left menu and click ‘Authentication’ in the submenu. Click the ‘Add’ button on the right and give a username and password for the MQTT connection later. Here we will use `emqx` and `xxxxxx` for the username and password.
128129

129-
<img src={emqx_cloud_auth} alt="EMQX Cloud Authentication Setup" />
130+
<Image img={emqx_cloud_auth} size="lg" border alt="EMQX Cloud Authentication Setup interface for adding credentials" />
130131

131-
Click Confirm and now we have a fully managed MQTT broker ready.
132+
Click 'Confirm' and now we have a fully managed MQTT broker ready.
132133

133134
### Enable NAT gateway {#enable-nat-gateway}
134135

135136
Before we can start setting up the ClickHouse integration, we need to enable the NAT gateway first. By default, the MQTT broker is deployed in a private VPC, which can not send data to third-party systems over the public network.
136137

137138
Go back to the Overview page and scroll down to the bottom of the page where you will see the NAT gateway widget. Click the Subscribe button and follow the instructions. Note that NAT Gateway is a value-added service, but it also offers a 14-day free trial.
138139

139-
<img src={emqx_cloud_nat_gateway} alt="EMQX Cloud NAT Gateway Configuration" />
140+
<Image img={emqx_cloud_nat_gateway} size="lg" border alt="EMQX Cloud NAT Gateway Configuration panel" />
140141

141142
Once it has been created, you will find the public IP address in the widget. Please note that if you select "Connect from a specific location" during ClickHouse Cloud setup, you will need to add this IP address to the whitelist.
142143

@@ -145,11 +146,11 @@ Once it has been created, you will find the public IP address in the widget. Ple
145146

146147
The [EMQX Cloud Data Integrations](https://docs.emqx.com/en/cloud/latest/rule_engine/introduction.html#general-flow) is used to configure the rules for handling and responding to EMQX message flows and device events. The Data Integrations not only provides a clear and flexible "configurable" architecture solution, but also simplifies the development process, improves user usability, and reduces the coupling degree between the business system and EMQX Cloud. It also provides a superior infrastructure for customization of EMQX Cloud's proprietary capabilities.
147148

148-
<img src={emqx_cloud_data_integration} alt="EMQX Cloud Data Integration Options" />
149+
<Image img={emqx_cloud_data_integration} size="lg" border alt="EMQX Cloud Data Integration Options showing available connectors" />
149150

150151
EMQX Cloud offers more than 30 native integrations with popular data systems. ClickHouse is one of them.
151152

152-
<img src={data_integration_clickhouse} alt="EMQX Cloud ClickHouse Data Integration" />
153+
<Image img={data_integration_clickhouse} size="lg" border alt="EMQX Cloud ClickHouse Data Integration connector details" />
153154

154155
### Create ClickHouse Resource {#create-clickhouse-resource}
155156

@@ -158,20 +159,20 @@ Click "Data Integrations" on the left menu and click "View All Resources". You w
158159
Click the ClickHouse card to create a new resource.
159160

160161
- Note: add a note for this resource.
161-
- Server address: this is the address of your ClickHouse Cloud service, remember dont forget the port.
162+
- Server address: this is the address of your ClickHouse Cloud service, remember don't forget the port.
162163
- Database name: `emqx` we created in the above steps.
163164
- User: the username for connecting to your ClickHouse Cloud service.
164165
- Key: the password for the connection.
165166

166-
<img src={data_integration_resource} alt="EMQX Cloud ClickHouse Resource Setup" />
167+
<Image img={data_integration_resource} size="lg" border alt="EMQX Cloud ClickHouse Resource Setup form with connection details" />
167168

168169
### Create A New Rule {#create-a-new-rule}
169170

170-
During the creation of the resource, you will see a popup, and clicking New will leads you to the rule creation page.
171+
During the creation of the resource, you will see a popup, and clicking 'New' will leads you to the rule creation page.
171172

172173
EMQX provides a powerful [rule engine](https://docs.emqx.com/en/cloud/latest/rule_engine/rules.html) that can transform, and enrich the raw MQTT message before sending it to third-party systems.
173174

174-
Heres the rule used in this tutorial:
175+
Here's the rule used in this tutorial:
175176

176177
```sql
177178
SELECT
@@ -192,11 +193,11 @@ So, the raw JSON you send to the topic:
192193
{"temp": 28.5, "hum": 0.68}
193194
```
194195

195-
<img src={data_integration_rule_1} alt="EMQX Cloud Data Integration Rule Creation Step 1" />
196+
<Image img={data_integration_rule_1} size="md" border alt="EMQX Cloud Data Integration Rule Creation Step 1 showing SQL query" />
196197

197198
You can use the SQL test to test and see the results.
198199

199-
<img src={data_integration_rule_2} alt="EMQX Cloud Data Integration Rule Creation Step 2" />
200+
<Image img={data_integration_rule_2} size="md" border alt="EMQX Cloud Data Integration Rule Creation Step 2 showing test results" />
200201

201202
Now click on the "NEXT" button. This step is to tell EMQX Cloud how to insert refined data into your ClickHouse database.
202203

@@ -209,29 +210,29 @@ You only need to set the SQL template. Here’s the example used for this tutori
209210
INSERT INTO temp_hum (client_id, timestamp, topic, temp, hum) VALUES ('${client_id}', ${timestamp}, '${topic}', ${temp}, ${hum})
210211
```
211212

212-
<img src={data_integration_rule_action} alt="EMQX Cloud Data Integration Rule Action Setup" />
213+
<Image img={data_integration_rule_action} size="md" border alt="EMQX Cloud Data Integration Rule Action Setup with SQL template" />
213214

214215
This is a template for inserting data into Clickhouse, you can see the variables are used here.
215216

216217
### View Rules Details {#view-rules-details}
217218

218219
Click "Confirm" and "View Details". Now, everything should be well set. You can see the data integration works from rule details page.
219220

220-
<img src={data_integration_details} alt="EMQX Cloud Data Integration Rule Details" />
221+
<Image img={data_integration_details} size="md" border alt="EMQX Cloud Data Integration Rule Details showing configuration summary" />
221222

222223
All the MQTT messages sent to the `temp_hum/emqx` topic will be persisted into your ClickHouse Cloud database.
223224

224225
## Saving Data into ClickHouse {#saving-data-into-clickhouse}
225226

226227
We will simulate temperature and humidity data and report these data to EMQX Cloud via the MQTT X and then use the EMQX Cloud Data Integrations to save the data into ClickHouse Cloud.
227228

228-
<img src={work_flow} alt="EMQX Cloud to ClickHouse Workflow" />
229+
<Image img={work_flow} size="lg" border alt="EMQX Cloud to ClickHouse Workflow diagram showing data flow" />
229230

230231
### Publish MQTT messages to EMQX Cloud {#publish-mqtt-messages-to-emqx-cloud}
231232

232233
You can use any MQTT client or SDK to publish the message. In this tutorial, we will use [MQTT X](https://mqttx.app/), a user friendly MQTT client application provided by EMQ.
233234

234-
<img src={mqttx_overview} alt="MQTTX Overview" />
235+
<Image img={mqttx_overview} size="lg" border alt="MQTTX Overview showing the client interface" />
235236

236237
Click "New Connection" on MQTTX and fill the connection form:
237238

@@ -240,15 +241,15 @@ Click "New Connection" on MQTTX and fill the connection form:
240241
- Port: MQTT broker connection port. You can get it from the EMQX Cloud overview page.
241242
- Username/Password: Use the credential created above, which should be `emqx` and `xxxxxx` in this tutorial.
242243

243-
<img src={mqttx_new} alt="MQTTX New Connection Setup" />
244+
<Image img={mqttx_new} size="lg" border alt="MQTTX New Connection Setup form with connection details" />
244245

245246
Click the "Connect" button on top right and the connection should be established.
246247

247248
Now you can send messages to the MQTT broker using this tool.
248249
Inputs:
249-
1. Set payload format to "JSON".
250-
2. Set to topic: `temp_hum/emqx` (the topic we just set in the rule)
251-
3. JSON body:
250+
1. Set payload format to "JSON".
251+
2. Set to topic: `temp_hum/emqx` (the topic we just set in the rule)
252+
3. JSON body:
252253

253254
```bash
254255
{"temp": 23.1, "hum": 0.68}
@@ -258,17 +259,17 @@ Click the send button on the right. You can change the temperature value and sen
258259

259260
The data sent to EMQX Cloud should be processed by the rule engine and inserted into ClickHouse Cloud automatically.
260261

261-
<img src={mqttx_publish} alt="MQTTX Publish MQTT Messages" />
262+
<Image img={mqttx_publish} size="lg" border alt="MQTTX Publish MQTT Messages interface showing message composition" />
262263

263264
### View rules monitoring {#view-rules-monitoring}
264265

265266
Check the rule monitoring and add one to the number of success.
266267

267-
<img src={rule_monitor} alt="EMQX Cloud Rule Monitoring" />
268+
<Image img={rule_monitor} size="lg" border alt="EMQX Cloud Rule Monitoring dashboard showing message processing metrics" />
268269

269270
### Check the data persisted {#check-the-data-persisted}
270271

271-
Now its time to take a look at the data on the ClickHouse Cloud. Ideally, the data you send using MQTTX will go to the EMQX Cloud and persist to the ClickHouse Clouds database with the help of native data integration.
272+
Now it's time to take a look at the data on the ClickHouse Cloud. Ideally, the data you send using MQTTX will go to the EMQX Cloud and persist to the ClickHouse Cloud's database with the help of native data integration.
272273

273274
You can connect to the SQL console on ClickHouse Cloud panel or use any client tool to fetch data from your ClickHouse. In this tutorial, we used the SQL console.
274275
By executing the SQL:
@@ -277,7 +278,7 @@ By executing the SQL:
277278
SELECT * FROM emqx.temp_hum;
278279
```
279280

280-
<img src={clickhouse_result} alt="ClickHouse Query Results" />
281+
<Image img={clickhouse_result} size="lg" border alt="ClickHouse Query Results showing persisted IoT data" />
281282

282283
### Summary {#summary}
283284

0 commit comments

Comments
 (0)