Skip to content

请问有没有什么方法能够查询某一天有数据的所有设备 #3929

Answered by SteveYurongSu
herowzz asked this question in Q&A
Discussion options

You must be logged in to vote

目前可以通过下面的步骤实现:

  1. 先查询指定时间范围所有(涉及的)设备下的 count 数量,例如
select count(measurement) from root.storage_group.*.*.* where time>2020-01-01T00:00:00 and time < 2020-01-02T00:00:00

这个过程中,您可能还会用到路径层级分组聚合,可参考:https://iotdb.apache.org/zh/UserGuide/Master/IoTDB-SQL-Language/DML-Data-Manipulation-Language.html#%E8%B7%AF%E5%BE%84%E5%B1%82%E7%BA%A7%E5%88%86%E7%BB%84%E8%81%9A%E5%90%88

  1. 取 count 不为 0 的设备(序列) 名称作为您后续的查询输入

另外,您在查询过程中可能会遇到

此时,您只需要改一下 iotdb-engine.propeties 配置文件里面的 max_deduplicated_path_num 然后执行 LOAD CONFIGURATION 或者重启系统即可。

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SteveYurongSu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants