Updated on 2025-07-16 GMT+08:00

Adding an IoTDB Data Source

This section applies to MRS 3.2.0 or later only.

Add an IoTDB JDBC data source on HSConsole of a cluster in security mode.

Prerequisites for Adding an IoTDB Data Source

  • The domain name of the cluster where the data source is located must be different from that of the HetuEngine cluster.
  • The cluster where the data source is located and the HetuEngine cluster nodes can communicate with each other.
  • A HetuEngine compute instance has been created.
  • By default, SSL is enabled for IoTDB in a cluster in security mode. After SSL is enabled, you need to upload the truststore.jks file. For details about how to obtain the file, see Using the IoTDB Client.

Procedure for Adding an IoTDB Data Source

  1. Log in to FusionInsight Manager as a HetuEngine administrator and choose Cluster > Services > HetuEngine.
  2. In the displayed Dashboard tab, find the Basic Information area, and click the link next to HSConsole WebUI.
  3. Choose Data Source and click Add Data Source. Configure parameters on the Add Data Source page.

    1. In the Basic Configuration area, set Name and select JDBC > IoTDB for Data Source Type.
    2. Configure parameters in the IoTDB Configuration area by referring to Table 1.
      Table 1 IoTDB configuration

      Parameter

      Description

      Example Value

      Driver

      The default value is iotdb.

      iotdb

      JDBC URL

      JDBC URL for connecting to IoTDB.

      The format is jdbc:iotdb://Service IP address 1 of IoTDBServer,Service IP address 2 of IoTDBServer:Port number.

      jdbc:iotdb://192.168.1.1,192.168.1.2:22260

      Username

      IoTDB username for connecting to the IoTDB data source

      NOTE:

      If the cluster where IoTDB is located is in non-security mode, set this parameter to the default IoTDB user root.

      Password

      Password of the IoTDB user for connecting to the IoTDB data source

      NOTE:

      If the cluster where IoTDB is located is in non-security mode, obtain the password of user root from the administrator of this cluster.

      Enable SSL

      Whether SSL is enabled for the IoTDB service. SSL is enabled by default in a cluster in security mode.

      Yes

      truststore File

      After SSL is enabled for IoTDB, upload the truststore.jks file.

      -

      • Service IP addresses of IoTDBServer:

        Log in to FusionInsight Manager and choose Cluster > Services > IoTDB. On the page that is displayed, click the Instances tab. On the displayed page, check Service IP Address of IoTDBServer.

      • Port number:

        Log in to FusionInsight Manager and choose Cluster > Services > IoTDB. On the page that is displayed, click the Configurations tab. On the displayed page, search for IOTDB_SERVER_RPC_PORT and check its value. The default value is 22260.

    3. (Optional) Add custom configurations as needed.
    4. Click OK.

  4. Log in to the node where the cluster client is located and run the following commands to switch to the client installation directory and authenticate the user:

    cd /opt/client

    source bigdata_env

    kinit User performing HetuEngine operations (If the cluster is in normal mode, skip this step.)

  5. Log in to the catalog of the data source.

    hetu-cli --catalog Data source name --schema Database name

    For example, run the following command:

    hetu-cli --catalog iotdb_1 --schema root.ln

  6. Run the following command. If the database table information can be viewed or no error is reported, the connection is successful.

    show tables;

IoTDB Data Type Mapping

IoTDB Data Type

HetuEngine Data Type

BOOLEAN

BOOLEAN

INT32

BIGINT

INT64

BIGINT

FLOAT

DOUBLE

DOUBLE

DOUBLE

TEXT

VARCHAR

IoTDB Data Source Function Enhancement

  • IoTDB can configure any label fields for time series. These IoTDB label fields and other data sources can be jointly queried through HetuEngine.
  • Any nodes from the IoTDB database level to the time series can be used as tables for data query on HetuEngine.

Constraints on IoTDB Data Sources

  • IoTDB data cannot be created but can be queried.
  • The IoTDB user who uses HetuEngine for query must at least be configured with the read permission on the root directory.