time-seriesapache-iotdb

How to mount different metadata templates for different devices of the same layer structure of Apache IoTDB?


If there are multiple metadata templates under the root.db layer of Apache IoTDB data structure, then if I need to mount these templates to different devices for this layer, how does the devices know which metadata template it should be mounted?


Solution

  • Firstly, you need to classify the devices when modeling in Apache IoTDB. For example, there are three templates, t1, t2, t3, and the devices are divided into three categories: device_class_A, device_class_B, device_class_C. Then, you can mount different templates to different kinds of devices by set schema template t1 to root.db.device_class_A, set schema template t2 to root.db.device_class_B, set schema template t3 to root.db.device_class_C. Also, for this logic to be achieved, you need to upgrade to the latest 1.2.2 version of IoTDB.