/* 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('org.wso2.iot.virtualfirealarm:1.0.0')
define stream virtualfirealarm (meta_owner string, meta_deviceId string, meta_time long, temperature float);

@Export('org.wso2.iot.devices.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;



