【问题标题】:How to determine whether a subpath is a node or a timeseries in Apache IoTDB如何确定子路径是 Apache IoTDB 中的节点还是时间序列
【发布时间】:2021-12-10 04:12:51
【问题描述】:

比如有一个路径root.sg_2

show child paths root.sg_2可以显示它的子路径,但是我无法确定子路径是节点还是时间序列。

我尝试使用show timeseries,它会显示所有时间序列。但我只想知道子路径的信息。

【问题讨论】:

    标签: apache-iotdb iotdb


    【解决方案1】:

    您可以使用SHOW TIMESERIES <PathPattern>

    IoTDB> show timeseries
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    |      timeseries|alias|storage group|dataType|encoding|compression|tags|attributes|
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    |   root.sg.d1.s3| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    |   root.sg.d1.s1| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    |   root.sg.d1.s2| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    |root.sg.d1.c1.s4| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    |root.sg.d1.c1.s5| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    Total line number = 5
    It costs 0.026s
    
    IoTDB> show child paths root.sg.d1
    +-------------+
    |  child paths|
    +-------------+
    |root.sg.d1.s1|
    |root.sg.d1.s2|
    |root.sg.d1.s3|
    |root.sg.d1.c1|
    +-------------+
    Total line number = 4
    It costs 0.015s
    
    IoTDB> show timeseries root.sg.d1.*
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    |      timeseries|alias|storage group|dataType|encoding|compression|tags|attributes|
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    |   root.sg.d1.s3| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    |   root.sg.d1.s1| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    |   root.sg.d1.s2| null|      root.sg|   INT32|     RLE|     SNAPPY|null|      null|
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    Total line number = 3
    It costs 0.015s
    
    IoTDB> show timeseries root.sg.*
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    |      timeseries|alias|storage group|dataType|encoding|compression|tags|attributes|
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    +----------------+-----+-------------+--------+--------+-----------+----+----------+
    Total line number = 0
    

    查看文档https://iotdb.apache.org/UserGuide/Master/IoTDB-SQL-Language/DDL-Data-Definition-Language.html#show-timeseries了解更多详情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-05
      • 2011-08-06
      • 1970-01-01
      • 2012-07-09
      • 2013-09-02
      • 1970-01-01
      • 1970-01-01
      • 2012-02-09
      相关资源
      最近更新 更多