You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a summary table (with two tags: location and device_id), the source table device_history also have these two tags, I need to summarized the power value for each location + device_id combination, and load it into the dest table.
CREATE STREAM stream_device_total_power
TRIGGER WINDOW_CLOSE
INTO device_total_power SUBTABLE(CONCAT('device_, CAST(device_id AS VARCHAR(12)), '_total_power'))AS SELECT _wend AS ts, SUM(power) AS total_powerFROM device_history PARTITION BY location, device_id INTERVAL(1d);
When I run the sql above, I got error:
DB error: Illegal number of columns (0.012870s)
Environment
TDEngine version: 3.1.0.3
Server: Ubuntu 22.04
The text was updated successfully, but these errors were encountered:
CREATE STREAM stream_device_total_power TRIGGER WINDOW_CLOSE INTO device_total_power SUBTABLE(CONCAT('device_', CAST(device_id AS VARCHAR(12)), '_total_power')) AS SELECT _wen
d AS ts, SUM(power) AS total_power FROM device_history PARTITION BY location, device_id INTERVAL(1d);
Question
I have a summary table (with two tags: location and device_id), the source table
device_history
also have these two tags, I need to summarized thepower
value for each location + device_id combination, and load it into the dest table.create stream
When I run the sql above, I got error:
Environment
TDEngine version: 3.1.0.3
Server: Ubuntu 22.04
The text was updated successfully, but these errors were encountered: