Updated on 2024-04-02 GMT+08:00

IoTDB Sample Project

To obtain an MRS sample project, visit https://github.com/huaweicloud/huaweicloud-mrs-example and switch to the branch that matches the MRS cluster version. Download the package to the local PC and decompress it to obtain the sample project of each component.

MRS provides the following IoTDB sample projects.
Table 1 IoTDB sample projects

Sample Project Location

Description

iotdb-examples/iotdb-flink-example

Program for using Flink to access IoTDB data, including FlinkIoTDBSink and FlinkIoTDBSource data.

FlinkIoTDBSink can use Flink jobs to write time series data to IoTDB. FlinkIoTDBSource reads time series data from IoTDB through Flink jobs and prints the data. For details, see IoTDB Flink.

iotdb-examples/iotdb-jdbc-example

Java sample program for IoTDB JDBC to process data

This example demonstrates how to use JDBC APIs to connect to IoTDB and run IoTDB SQL statements. For details, see IoTDB JDBC.

iotdb-examples/iotdb-kafka-example

Sample program for accessing IoTDB data through Kafka

This program demonstrates how to send time series data to Kafka and then use multiple threads to write the data to IoTDB. For details, see IoTDB Kafka.

iotdb-examples/iotdb-session-example

Java sample program for IoTDB Session to process data

This example demonstrates how to use Session to connect to IoTDB and run IoTDB SQL statements. For details, see IoTDB Session.

iotdb-examples/iotdb-udf-exmaple

This sample program describes how to implement a simple IoTDB user-defined function (UDF). For details, see IoTDB UDF Program.