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
Copy file name to clipboardExpand all lines: en_US/data-integration/data-bridge-tdengine.md
+65-9Lines changed: 65 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -48,9 +48,13 @@ This section describes the preparations you must complete before you start creat
48
48
- Knowledge about EMQX data integration [rules](./rules.md)
49
49
- Knowledge about [data integration](./data-bridges.md)
50
50
51
-
### Install TDengine
51
+
### Start TDengine and Create a Database
52
52
53
-
Install TDengine via Docker, and then run the docker image.
53
+
You can use the following two methods to start the TDengine or connect to a TDengine service and create a database.
54
+
55
+
:::: tabs
56
+
57
+
::: tab Docker
54
58
55
59
```bash
56
60
# To start the TDengine docker image
@@ -68,9 +72,29 @@ CREATE DATABASE mqtt;
68
72
use mqtt;
69
73
```
70
74
75
+
:::
76
+
77
+
::: tab TDengine Cloud
78
+
79
+
If you are using [TDengine Cloud](https://cloud.tdengine.com/), simply login to the console, select your Instance, and click **Explorer** on the left to enter the SQL execution page. Then, execute the following statement to create a database:
Before you create data bridges for TDengine, you need to create two data tables in TDengine database for message storage and status recording.
97
+
You need to create two data tables in TDengine database for message storage and status recording.
74
98
75
99
1. Use the following SQL statements to create data table `t_mqtt_msg` in TDengine database. The data table stores the client ID, topic, payload, and creation time of every message.
76
100
@@ -99,22 +123,54 @@ Before you create data bridges for TDengine, you need to create two data tables
99
123
100
124
This section demonstrates how to create a Connector to connect the Sink to the TDengine server.
101
125
102
-
The following steps assume that you run both EMQX and TDengine on the local machine. If you have TDengine and EMQX running remotely, adjust the settings accordingly.
103
-
104
126
1. Enter the EMQX Dashboard and click **Integration** -> **Connectors**.
127
+
105
128
2. Click **Create** in the top right corner of the page.
129
+
106
130
3. On the **Create Connector** page, select **TDengine** and then click **Next**.
107
-
4. In the **Configuration** step, configure the following information:
131
+
132
+
4. In the **Configuration** step, configure the following information based on what you connect to:
133
+
134
+
::: tabs
135
+
136
+
::: tab Connect to TDengine
137
+
138
+
The following configuration assume that you run both EMQX and TDengine on the local machine. If you have TDengine and EMQX running remotely, adjust the settings accordingly.
139
+
108
140
-**Connector name**: Enter a name for the connector, which should be a combination of upper and lower case letters and numbers, for example: `my_tdengine`.
109
141
-**Server Host**: Enter `http://127.0.0.1:6041`, or the actual URL if the TDengine server is running remotely.
110
142
-**Database Name**: Enter `mqtt`.
111
143
-**Username**: Enter `root`.
112
144
-**Password**: Enter `taosdata`.
113
-
-**Token**: If you are connecting to TDengine Cloud, you must provide a valid authentication token.
114
-
- When specified, this token will take precedence over the **Username** and **Password** authentication method.
115
-
- If left empty, the connector will attempt to authenticate using the **Username** and **Password** credentials.
145
+
-**Token**: Left empty. The connector will attempt to authenticate using the **Username** and **Password** credentials.
146
+
147
+
:::
148
+
149
+
::: tab Connect to TDengine Cloud
150
+
151
+
1. Select the correct **Instance** on the TDengine Cloud console page.
152
+
153
+
2. Navigate to **Programming** on the left, then select the **REST API** connection method. As shown in the image below, you will obtain the corresponding connection URL and Token:
154
+
155
+

156
+
157
+
3. Enter the following connector configuration information:
158
+
159
+
-**Connector name**: Enter a name for the connector, which should be a combination of upper and lower case letters and numbers, for example: `my_tdengine`.
160
+
-**Server Host**: Enter the value of `TDENGINE_CLOUD_URL` provided by the TDengine Cloud. In this demonstration, it is `https://gw.***.cloud.tdengine.com`.
161
+
-**Database Name**: Enter `mqtt`.
162
+
-**Username**: Left empty
163
+
-**Password**: Left empty
164
+
-**Token**: Enter the value of `TDENGINE_CLOUD_TOKEN` provided by the TDengine Cloud. In this demonstration, it is `a2ba69cc6****f0c18cd`.
165
+
166
+
:::
167
+
168
+
::::
169
+
116
170
5. Advanced settings (optional): For details, see [Features of Sink](./data-bridges.md#features-of-sink).
171
+
117
172
6. Before clicking **Create**, you can click **Test Connectivity** to test if the connector can connect to the TDengine server.
173
+
118
174
7. Click the **Create** button at the bottom to complete the creation of the connector. In the pop-up dialog, you can click **Back to Connector List** or click **Create Rule** to continue creating rules with Sinks to specify the data to be forwarded to TDengine and to record client events. For detailed steps, see [Create a Rule with TDengine Sink for Message Storage](#create-a-rule-with-tdengine-sink-for-message-storage) and [Create a Rule with TDengine Sink for Events Recording](#create-a-rule-with-tdengine-sink-for-events-recording).
119
175
120
176
## Create a Rule with TDengine Sink for Message Storage
0 commit comments