/* Enter a unique ExecutionPlan */
@Plan:name('virtualfirealarm_execution')

/* Enter a unique description for ExecutionPlan */
-- @Plan:description('virtualfirealarm_execution')

/* define streams/tables and write queries here ... */

@Import('iot.per.device.stream.virtualfirealarm:1.0.0')
define stream virtualfirealarm (meta_owner string, meta_deviceId string, meta_time long, temperature float);

@Export('iot.per.device.stream.virtualfirealarm.temperature:1.0.0')
define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float);

from virtualfirealarm
select meta_owner, 'virtual_firealarm' as meta_deviceType, meta_deviceId, time:timestampInMilliseconds() as meta_time, temperature
insert into temperature;



