【TDengine 使用环境】
生产环境 /测试/ Poc/预生产环境
【TDengine 版本】
3.3.8.8
【操作系统以及版本】
【部署方式】容器/非容器部署
【集群节点数】
【集群副本数】
【描述业务影响】
【问题复现路径/shan】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】
【报错完整截图】(不要大段的粘贴报错代码,论坛直接看报错代码不直观)
这个要怎么创建流式计算呢?我现在写得是两张表都用window_count(1)触发器,触发得时候用 inner join 关联两张表,如果查到数据就插入结果表,但是一触发就报错阿out of range,执行状态是Faild,这个是我得思路有问题么?还有这个报错日志能不能输出完整一点,实在看不出来有什么问题
create stream proj_wsha_sn.st_b_b_glb_identify_purification_hot_total_power count_window(1)
from proj_wsha_sn.glb_identify_purification_oxy_ele_heat_power partition by tbname,fto_id,fto_name,pur_id,pur_name stream_options(low_latency_calc)
into proj_wsha_sn.glb_identify_purification_hot_total_power output_subtable(concat(‘giphtp_pur’,replace(fto_id,‘#’,‘’))) tags (fto_id varchar(128) as fto_id,fto_name varchar(128) as fto_name,pur_id varchar(128) as pur_id,pur_name varchar(128) as pur_name) as select _twstart as time,(o.val+h.val) as val from %%tbname o inner join proj_wsha_sn.temp_fto_purification_hyd_ele_heat_power h on h.fto_id = o.fto_id and h.time = o.time where h.time = _twstart;
请将 两个张表的 schema给一下,我们在自己的环境验证一下。
create stream proj_wsha_sn.st_b_b_glb_identify_purification_hot_total_power count_window(1)
from proj_wsha_sn.glb_identify_purification_oxy_ele_heat_power partition by tbname,fto_id,fto_name,pur_id,pur_name stream_options(low_latency_calc)
into proj_wsha_sn.glb_identify_purification_hot_total_power output_subtable(concat(‘giphtp_pur’,replace(fto_id,‘#’,‘’))) tags (fto_id varchar(128) as fto_id,fto_name varchar(128) as fto_name,pur_id varchar(128) as pur_id,pur_name varchar(128) as pur_name) as select _twstart as time,(o.val+h.val) as val from %%tbname o inner join proj_wsha_sn.temp_fto_purification_hyd_ele_heat_power h on h.fto_id = o.fto_id and h.time = o.time where h.time = _twstart;
输出create
stable
proj_wsha_sn.glb_identify_purification_hot_total_power
(time timestamp, val double)
tags (fto_id varchar(128),fto_name varchar(128), pur_id varchar(128), pur_name varchar(128));
输入create
stable
proj_wsha_sn.glb_identify_purification_oxy_ele_heat_power
(time timestamp, val double)
tags (fto_id varchar(128),fto_name varchar(128), pur_id varchar(128), pur_name varchar(128), oxy_id varchar(128), oxy_name varchar(128));