Node Management

    Example:

    • return the child paths of root.ln:show child paths root.ln
    1. | child paths|
    2. +------------+
    3. |root.ln.wf01|
    4. |root.ln.wf02|
    5. +------------+
    6. Total line number = 2
    7. It costs 0.002s
    1. SHOW CHILD NODES pathPattern

    Return all child nodes of the pathPattern.

    Example:

    • return the child nodes of root:show child nodes root
    • return the child nodes of root.ln:show child nodes root.ln
    1. +------------+
    2. | child nodes|
    3. +------------+
    4. | wf01|
    5. | wf02|
    6. +------------+
    1. IoTDB > COUNT NODES root.** LEVEL=2
    2. IoTDB > COUNT NODES root.ln.wf01.** LEVEL=3
    3. IoTDB > COUNT NODES root.**.temperature LEVEL=3

    As for the above mentioned example and Metadata tree, you can get following results:

    Note: The path of timeseries is just a filter condition, which has no relationship with the definition of level.

    • SHOW DEVICES pathPattern? (WITH STORAGE GROUP)? limitClause? #showDevices

    Similar to Show Timeseries, IoTDB also supports two ways of viewing devices:

    • SHOW DEVICES statement presents all devices’ information, which is equal to SHOW DEVICES root.**.
    • statement specifies the PathPattern and returns the devices information matching the pathPattern and under the given level.

    SQL statement is as follows:

    1. IoTDB> show devices
    2. IoTDB> show devices root.ln.**
    1. +-------------------+---------+
    2. | devices|isAligned|
    3. +-------------------+---------+
    4. | root.ln.wf01.wt01| false|
    5. | root.ln.wf02.wt02| false|
    6. |root.sgcc.wf03.wt01| false|
    7. | root.turbine.d1| false|
    8. +-------------------+---------+
    9. Total line number = 4
    10. It costs 0.002s
    11. +-----------------+---------+
    12. | devices|isAligned|
    13. +-----------------+---------+
    14. |root.ln.wf01.wt01| false|
    15. |root.ln.wf02.wt02| false|
    16. Total line number = 2
    17. It costs 0.001s

    indicates whether the timeseries under the device are aligned.

    To view devices’ information with storage group, we can use SHOW DEVICES WITH STORAGE GROUP statement.

    • SHOW DEVICES WITH STORAGE GROUP statement presents all devices’ information with their storage group.
    • SHOW DEVICES <PathPattern> WITH STORAGE GROUP statement specifies the PathPattern and returns the devices’ information under the given level with their storage group information.

    SQL statement is as follows:

    You can get results below:

    1. +-------------------+-------------+---------+
    2. | devices|storage group|isAligned|
    3. +-------------------+-------------+---------+
    4. | root.ln.wf01.wt01| root.ln| false|
    5. | root.ln.wf02.wt02| root.ln| false|
    6. |root.sgcc.wf03.wt01| root.sgcc| false|
    7. | root.turbine.d1| root.turbine| false|
    8. +-------------------+-------------+---------+
    9. Total line number = 4
    10. It costs 0.003s
    11. +-----------------+-------------+---------+
    12. | devices|storage group|isAligned|
    13. +-----------------+-------------+---------+
    14. |root.ln.wf01.wt01| root.ln| false|
    15. |root.ln.wf02.wt02| root.ln| false|
    16. +-----------------+-------------+---------+
    17. Total line number = 2