> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> EMQX 与 ClickHouse 集成简介

# 集成 EMQX 与 ClickHouse

export const Image = ({img, alt, size = "lg"}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} />
      </Frame>
    </div>;
};

<div id="connecting-emqx">
  ## 连接 EMQX
</div>

[EMQX](https://www.emqx.com/en/try?product=enterprise) 是一款开源 MQTT broker，拥有高性能的实时消息处理引擎，可为海量 IoT 设备提供事件流能力。作为扩展能力最强的 MQTT broker，EMQX 可帮助您连接任意设备，轻松应对任意规模，并可在任何地方传输和处理 IoT 数据。

[EMQX Cloud](https://www.emqx.com/en/try?product=cloud) 是由 [EMQ](https://www.emqx.com/en) 提供的、面向 IoT 领域的 MQTT 消息中间件产品。作为全球首个 fully managed 的 MQTT 5.0 云消息服务，EMQX Cloud 提供一站式运维托管和独立隔离的 MQTT 消息服务环境。在万物互联时代，EMQX Cloud 可帮助您快速构建面向 IoT 的行业应用，并轻松完成 IoT 数据的采集、传输、计算和持久化。

借助云提供商提供的基础设施，EMQX Cloud 已服务全球数十个国家和区域，为 5G 和万物互联应用提供低成本、安全、可靠的云服务。

<Image img="https://mintcdn.com/private-7c7dfe99/MoeBDs4tywkUTQ28/images/integrations/data-ingestion/emqx/emqx-cloud-artitecture.png?fit=max&auto=format&n=MoeBDs4tywkUTQ28&q=85&s=26b604bbb320156a33f909dec809f7f2" size="lg" border alt="展示云基础设施组件的 EMQX Cloud 架构图" width="1384" height="952" data-path="images/integrations/data-ingestion/emqx/emqx-cloud-artitecture.png" />

<div id="assumptions">
  ### 前提条件
</div>

* 你已熟悉 [MQTT 协议](https://mqtt.org/)，它是一种极其轻量的发布/订阅消息传输协议。
* 你正在使用 EMQX 或 EMQX Cloud 作为实时消息处理引擎，为大规模 IoT 设备提供事件流能力。
* 你已准备好一个 ClickHouse Cloud 实例来持久化设备数据。
* 我们使用 [MQTT X](https://mqttx.app/) 作为 MQTT 客户端测试工具，连接已部署的 EMQX Cloud 并发布 MQTT 数据。或者，也可以使用其他方法连接到 MQTT broker。

<div id="get-your-clickhouse-cloudservice">
  ## 获取 ClickHouse Cloud 服务
</div>

在此设置过程中，我们将 ClickHouse 实例部署在 AWS 的 N. Virginia (us-east-1) ，同时也在同一区域部署了一个 EMQX Cloud 实例。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_cloud_1.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=ebe6c6967d845e134ab5c7e39af7f8ea" size="sm" border alt="显示 AWS 区域选择的 ClickHouse Cloud 服务部署界面" width="1164" height="1734" data-path="images/integrations/data-ingestion/emqx/clickhouse_cloud_1.webp" />

在设置过程中，你还需要留意连接设置。在本教程中，我们选择 "Anywhere"；但如果你申请了特定位置，则需要将从 EMQX Cloud 部署中获取的 [NAT gateway](https://docs.emqx.com/en/cloud/latest/vas/nat-gateway.html) IP 地址添加到白名单。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_cloud_2.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=5dcb6b6eaad541cb45e18ed6a9e27c2a" size="sm" border alt="显示 IP 访问配置的 ClickHouse Cloud 连接设置" width="1108" height="1250" data-path="images/integrations/data-ingestion/emqx/clickhouse_cloud_2.webp" />

然后，你需要保存用户名和密码，以备后续使用。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_cloud_3.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=d46fbe0ccfbdfe390ecd14df932677b6" size="sm" border alt="显示用户名和密码的 ClickHouse Cloud 凭据界面" width="1050" height="1116" data-path="images/integrations/data-ingestion/emqx/clickhouse_cloud_3.webp" />

完成后，你将获得一个正在运行的 ClickHouse 实例。点击 "Connect" 获取 ClickHouse Cloud 的实例连接地址。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_cloud_4.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=0f31e069ab866619c99a6f15726b2f8e" size="lg" border alt="带有连接选项的 ClickHouse Cloud 运行中实例仪表板" width="3834" height="1116" data-path="images/integrations/data-ingestion/emqx/clickhouse_cloud_4.webp" />

点击 "Connect to SQL Console"，为与 EMQX Cloud 集成创建数据库和表。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_cloud_5.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=29977d8f0f80f6c73611dbfdf5538b57" size="lg" border alt="ClickHouse Cloud SQL 控制台界面" width="3838" height="1860" data-path="images/integrations/data-ingestion/emqx/clickhouse_cloud_5.webp" />

你可以参考以下 SQL 语句，或根据实际情况对 SQL 进行修改。

```sql theme={null}
CREATE TABLE emqx.temp_hum
(
   client_id String,
   timestamp DateTime,
   topic String,
   temp Float32,
   hum Float32
)
ENGINE = MergeTree()
PRIMARY KEY (client_id, timestamp)
```

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_cloud_6.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=337b8baea98296d6266ecd450dfaccec" size="lg" border alt="ClickHouse Cloud 中创建数据库和表的 SQL 查询执行界面" width="3826" height="1284" data-path="images/integrations/data-ingestion/emqx/clickhouse_cloud_6.webp" />

<div id="create-an-mqtt-service-on-emqx-cloud">
  ## 在 EMQX Cloud 上创建 MQTT 服务
</div>

在 EMQX Cloud 上创建专用 MQTT broker，只需轻点几下即可。

<div id="get-an-account">
  ### 获取账户
</div>

EMQX Cloud 为每个账户的标准部署和专业部署均提供 14 天免费试用。

如果您是首次使用 EMQX Cloud，请前往 [EMQX Cloud 注册](https://accounts.emqx.com/signup?continue=https%3A%2F%2Fwww.emqx.com%2Fen%2Fcloud) 页面，点击 Start Free 注册账户。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/emqx_cloud_sign_up.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=285f6ead67323b3c5abd6fe1bb1d46a7" size="lg" border alt="带有注册表单的 EMQX Cloud 注册页面" width="2744" height="1832" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_sign_up.webp" />

<div id="create-an-mqtt-cluster">
  ### 创建 MQTT 集群
</div>

登录后，点击账户菜单中的“Cloud console”，即可看到用于创建新部署的绿色按钮。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/emqx_cloud_create_1.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=ab37b9abf0dc24233a0d91864a42ce3f" size="lg" border alt="EMQX Cloud 创建部署第 1 步，显示部署选项" width="3078" height="1844" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_create_1.webp" />

在本教程中，我们将使用 Professional 部署，因为只有 Pro 版本提供数据集成功能，无需编写任何代码即可将 MQTT 数据直接发送到 ClickHouse。

选择 Pro 版本，选择 `N.Virginial` 区域，然后点击 `Create Now`。几分钟后，你就会获得一个全托管的 MQTT broker：

<Image img="https://mintcdn.com/private-7c7dfe99/MoeBDs4tywkUTQ28/images/integrations/data-ingestion/emqx/emqx_cloud_create_2.png?fit=max&auto=format&n=MoeBDs4tywkUTQ28&q=85&s=95210641d3d47a5ee0ea31cab6876087" size="lg" border alt="EMQX Cloud 创建部署第 2 步，显示区域选择" width="3062" height="830" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_create_2.png" />

现在点击该面板进入集群视图。在此仪表板上，你将看到 MQTT broker 的概览。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/emqx_cloud_overview.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=07697f0799e7dee1b5ad7c1bbfc584c6" size="lg" border alt="EMQX Cloud 概览仪表板，显示 broker 指标" width="3162" height="1840" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_overview.webp" />

<div id="add-client-credential">
  ### 添加客户端凭据
</div>

EMQX Cloud 默认不允许匿名连接，因此你需要添加客户端凭据，才能使用 MQTT 客户端工具向该 broker 发送数据。

点击左侧菜单中的“Authentication & ACL”，然后点击子菜单中的“Authentication”。点击右侧的“Add”按钮，并设置稍后用于 MQTT 连接的用户名和密码。这里我们将使用 `emqx` 和 `xxxxxx` 作为用户名和密码。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/emqx_cloud_auth.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=e7adf36bad703f6fa699d4ee81b41b5e" size="lg" border alt="用于添加凭据的 EMQX Cloud 身份验证设置界面" width="3164" height="1400" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_auth.webp" />

点击“Confirm”后，一个可用的全托管 MQTT broker 就准备好了。

<div id="enable-nat-gateway">
  ### 启用 NAT gateway
</div>

在开始设置 ClickHouse 集成之前，需要先启用 NAT gateway。默认情况下，MQTT broker 部署在私有 VPC 中，无法通过公网向第三方系统发送数据。

返回 Overview 页面并滚动到页面底部，你会看到 NAT gateway 组件。点击 Subscribe 按钮并按照提示操作。请注意，NAT Gateway 是一项增值服务，但提供 14 天免费试用。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/emqx_cloud_nat_gateway.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=68b6012e49ed32986083530837c393cc" size="lg" border alt="EMQX Cloud NAT Gateway 配置面板" width="2358" height="364" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_nat_gateway.webp" />

创建完成后，你可以在该组件中看到公网 IP 地址。请注意，如果你在设置 ClickHouse Cloud 时选择了 "Connect from a specific location"，则需要将该 IP 地址添加到白名单中。

<div id="integration-emqx-cloud-with-clickhouse-cloud">
  ## 将 EMQX Cloud 与 ClickHouse Cloud 集成
</div>

[EMQX Cloud Data Integrations](https://docs.emqx.com/en/cloud/latest/data_integration/introduction.html) 用于配置处理和响应 EMQX 消息流及设备事件的规则。Data Integrations 不仅提供了清晰、灵活且“可配置”的架构方案，还简化了开发流程，提升了易用性，并降低了业务系统与 EMQX Cloud 之间的耦合度。它还为定制 EMQX Cloud 的专有能力提供了更完善的基础设施。

<Image img="https://mintcdn.com/private-7c7dfe99/MoeBDs4tywkUTQ28/images/integrations/data-ingestion/emqx/emqx_cloud_data_integration.png?fit=max&auto=format&n=MoeBDs4tywkUTQ28&q=85&s=4b70eb05a322305309b5dba4ef8134f1" size="lg" border alt="显示可用连接器的 EMQX Cloud Data Integrations 选项" width="1746" height="812" data-path="images/integrations/data-ingestion/emqx/emqx_cloud_data_integration.png" />

EMQX Cloud 为常见数据系统提供了 30 多种原生集成，ClickHouse 就是其中之一。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/data_integration_clickhouse.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=48e6843ef151942ac19d382b3f7eadad" size="lg" border alt="EMQX Cloud ClickHouse Data Integrations 连接器详情" width="3080" height="1902" data-path="images/integrations/data-ingestion/emqx/data_integration_clickhouse.webp" />

<div id="create-clickhouse-resource">
  ### 创建 ClickHouse 资源
</div>

点击左侧菜单中的“数据集成”，然后点击“View All Resources”。你可以在 Data Persistence 部分找到 ClickHouse，也可以直接搜索 ClickHouse。

点击 ClickHouse 卡片以创建新资源。

* Note：为该资源添加备注。
* Server address：这是你的 ClickHouse Cloud 服务地址，记得填写端口。
* Database name：我们在上述步骤中创建的 `emqx`。
* User：用于连接到你的 ClickHouse Cloud 服务的用户名。
* Key：连接密码。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/data_integration_resource.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=a160a7f8146f2d01825c754e6916c7f9" size="lg" border alt="EMQX Cloud ClickHouse 资源设置表单，包含连接详情" width="3468" height="1504" data-path="images/integrations/data-ingestion/emqx/data_integration_resource.webp" />

<div id="create-a-new-rule">
  ### 创建新规则
</div>

在创建资源时，您会看到一个弹窗，点击 'New' 即可进入规则创建页面。

EMQX 提供了强大的[规则引擎](https://docs.emqx.com/en/cloud/latest/data_integration/rules.html)，可在将原始 MQTT 消息发送到第三方系统之前，对其进行转换和增强。

以下是本教程中使用的规则：

```sql theme={null}
SELECT
   clientid AS client_id,
   (timestamp div 1000) AS timestamp,
   topic AS topic,
   payload.temp AS temp,
   payload.hum AS hum
FROM
"temp_hum/emqx"
```

它将从 `temp_hum/emqx` topic 读取消息，并为该 JSON 对象补充 client\_id、topic 和时间戳信息。

因此，你发送到该 topic 的原始 JSON 如下：

```bash theme={null}
{"temp": 28.5, "hum": 0.68}
```

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/data_integration_rule_1.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=6f2ddb633f71f6c2361d53a3a9bf7ae0" size="md" border alt="EMQX Cloud 数据集成规则创建第 1 步，显示 SQL 查询" width="2356" height="1568" data-path="images/integrations/data-ingestion/emqx/data_integration_rule_1.webp" />

你可以使用 SQL 测试功能来查看结果。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/data_integration_rule_2.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=88cfcbf8acb4128fd34a65f0e9f7298f" size="md" border alt="EMQX Cloud 数据集成规则创建第 2 步，显示测试结果" width="2344" height="1718" data-path="images/integrations/data-ingestion/emqx/data_integration_rule_2.webp" />

现在点击“NEXT”按钮。此步骤用于告诉 EMQX Cloud 如何将处理后的数据插入到你的 ClickHouse 数据库中。

<div id="add-a-response-action">
  ### 添加响应动作
</div>

如果您只有一个资源，则无需修改“Resource”和“Action Type”。
您只需设置 SQL 模板。以下是本教程使用的示例：

```bash theme={null}
INSERT INTO temp_hum (client_id, timestamp, topic, temp, hum) VALUES ('${client_id}', ${timestamp}, '${topic}', ${temp}, ${hum})
```

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/data_integration_rule_action.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=6702309ef44c980b5c342f2c525883f5" size="md" border alt="使用 SQL 模板的 EMQX Cloud 数据集成规则操作设置" width="2310" height="1586" data-path="images/integrations/data-ingestion/emqx/data_integration_rule_action.webp" />

这是一个向 ClickHouse 插入数据的模板，你可以看到这里使用了变量。

<div id="view-rules-details">
  ### 查看规则详情
</div>

点击“Confirm”和“View Details”。现在，一切应该都已设置妥当。您可以在规则详情页面查看数据集成是否正常工作。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/data_integration_details.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=3dacbea781688b85d51d9492a3870e63" size="md" border alt="显示配置摘要的 EMQX Cloud 数据集成规则详情" width="2344" height="1950" data-path="images/integrations/data-ingestion/emqx/data_integration_details.webp" />

所有发送到 `temp_hum/emqx` topic 的 MQTT 消息都会被持久化到您的 ClickHouse Cloud 数据库中。

<div id="saving-data-into-clickhouse">
  ## 将数据写入 ClickHouse
</div>

我们将模拟温度和湿度数据，通过 MQTT X 将这些数据上报到 EMQX Cloud，然后使用 EMQX Cloud Data Integrations 将数据写入 ClickHouse Cloud。

<Image img="https://mintcdn.com/private-7c7dfe99/aXjbJ_BeTfguOdOV/images/integrations/data-ingestion/emqx/work-flow.png?fit=max&auto=format&n=aXjbJ_BeTfguOdOV&q=85&s=49696cba1f957d1e17d07f26354c56e1" size="lg" border alt="EMQX Cloud 到 ClickHouse 的工作流程图，显示数据流向" width="1209" height="559" data-path="images/integrations/data-ingestion/emqx/work-flow.png" />

<div id="publish-mqtt-messages-to-emqx-cloud">
  ### 向 EMQX Cloud 发布 MQTT 消息
</div>

你可以使用任意 MQTT 客户端或 SDK 发布消息。在本教程中，我们将使用 [MQTT X](https://mqttx.app/)，这是 EMQ 提供的一款易于使用的 MQTT 客户端应用。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/mqttx-overview.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=32e9c8cc8e91d74205beeba531ba0087" size="lg" border alt="显示客户端界面的 MQTTX 概览" width="2880" height="1800" data-path="images/integrations/data-ingestion/emqx/mqttx-overview.webp" />

在 MQTTX 中点击 "New Connection"，并填写连接表单：

* Name：连接名称。可使用任意你喜欢的名称。
* Host：MQTT broker 的连接地址。可从 EMQX Cloud 的 Overview 页面获取。
* Port：MQTT broker 的连接端口。可从 EMQX Cloud 的 Overview 页面获取。
* Username/Password：使用上面创建的凭证，本教程中应为 `emqx` 和 `xxxxxx`。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/mqttx-new.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=c44769ecb31b4592e1c909055fa6d47f" size="lg" border alt="包含连接详情的 MQTTX 新建连接设置表单" width="2174" height="1696" data-path="images/integrations/data-ingestion/emqx/mqttx-new.webp" />

点击右上角的 "Connect" 按钮后，即可建立连接。

现在，你可以使用此工具向 MQTT broker 发送消息。
输入如下：

1. 将载荷格式设为 "JSON"。
2. 将 topic 设为：`temp_hum/emqx` (即我们刚刚在规则中设置的 topic)
3. JSON 正文：

```bash theme={null}
{"temp": 23.1, "hum": 0.68}
```

点击右侧的发送按钮。你可以修改温度值，并向 MQTT broker 发送更多数据。

发送到 EMQX Cloud 的数据会由规则引擎处理，并自动写入 ClickHouse Cloud。

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/mqttx-publish.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=f07de3993361412c2027c3f3763f0ab9" size="lg" border alt="显示消息编写界面的 MQTTX 发布 MQTT 消息界面" width="2880" height="1800" data-path="images/integrations/data-ingestion/emqx/mqttx-publish.webp" />

<div id="view-rules-monitoring">
  ### 查看规则监控
</div>

检查规则监控，确认成功次数增加了 1。

<Image img="https://mintcdn.com/private-7c7dfe99/pIetLsS_hOGHqoPJ/images/integrations/data-ingestion/emqx/rule_monitor.webp?fit=max&auto=format&n=pIetLsS_hOGHqoPJ&q=85&s=5f99bd3e6e8d75bd73f877b5767ff72f" size="lg" border alt="显示消息处理指标的 EMQX Cloud 规则监控仪表板" width="2866" height="1066" data-path="images/integrations/data-ingestion/emqx/rule_monitor.webp" />

<div id="check-the-data-persisted">
  ### 检查已持久化的数据
</div>

现在可以查看 ClickHouse Cloud 中的数据了。理想情况下，你通过 MQTTX 发送的数据会先进入 EMQX Cloud，并借助原生数据集成持久化到 ClickHouse Cloud 的 database 中。

你可以连接到 ClickHouse Cloud 面板中的 SQL 控制台，或使用任意客户端工具从 ClickHouse 中查询数据。本教程中，我们使用的是 SQL 控制台。
执行以下 SQL：

```bash theme={null}
SELECT * FROM emqx.temp_hum;
```

<Image img="https://mintcdn.com/private-7c7dfe99/dZZG_-B0EzCG8L4V/images/integrations/data-ingestion/emqx/clickhouse_result.webp?fit=max&auto=format&n=dZZG_-B0EzCG8L4V&q=85&s=6bf4810df5bba79627274ade1a726d64" size="lg" border alt="展示已持久化 IoT 数据的 ClickHouse 查询结果" width="3830" height="900" data-path="images/integrations/data-ingestion/emqx/clickhouse_result.webp" />

<div id="summary">
  ### 总结
</div>

你无需编写任何代码，就已经让 MQTT 数据从 EMQX Cloud 流入 ClickHouse Cloud。借助 EMQX Cloud 和 ClickHouse Cloud，你无需管理基础设施，只需专注于开发 IoT 应用，数据则可安全地存储在 ClickHouse Cloud 中。
