Hello everyone,
i've derived a STREAM called "temperature" from an IoT Kafka topic, containing generic messages with an attribute "messagetype", possibly "ERROR" or "DATA".
Now i'm trying to create a TABLE selecting only the messages with attribute "messagetype"="ERROR", usign this syntax:
CREATE TABLE errors AS SELECT
messagetimestamp,device,messagename,messagestringvalue
FROM temperature
WHERE messagetype='ERROR'
EMIT CHANGES;
But i cannot complete the operation, with the error:
"Invalid result type. Your SELECT query produces a STREAM. Please use CREATE STREAM AS SELECT statement instead."
Thanks,
Alessio