You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "FengQingxin (Jira)" <ji...@apache.org> on 2022/01/13 03:48:00 UTC

[jira] [Created] (IOTDB-2378) [CQ]支持$变量定义到传感器位(当前实现+1)

FengQingxin created IOTDB-2378:
----------------------------------

             Summary: [CQ]支持$变量定义到传感器位(当前实现+1)
                 Key: IOTDB-2378
                 URL: https://issues.apache.org/jira/browse/IOTDB-2378
             Project: Apache IoTDB
          Issue Type: Improvement
            Reporter: FengQingxin


(需求)目前我的时间序列是root.test.g_0.d_0.s_0,在CQ中$因为我写的语句如下

CREATE CONTINUOUS QUERY cqmax RESAMPLE EVERY 20s FOR 20s BEGIN SELECT max_value(*) INTO root.cq4.${2}.${3}.maxValue FROM root.test.*.* GROUP BY time(10s) END

所以$最大写到${3},如需求是:计算所有传感器的最大值写入时间序列名称为“原传感器名称_maxValue”。目前版本没有找到实现方案。所以是否可以抽象一下$4代表 select 后 from前的位置?

这样我们就可以支持:

CREATE CONTINUOUS QUERY cqmax RESAMPLE EVERY 20s FOR 20s BEGIN SELECT max_value(*) INTO root.cq4.${2}.${3}.${4}_maxValue FROM root.test.*.* GROUP BY time(10s) END

 

请参考。

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)