...
- On the Main tab, click Execution Plans.
- Click Add Execution Plan.
Copy the execution plan that is given below and replace the sample content that is in the text box.
Code Block @Plan:name('analze_battery_levelExecutionPlan') @Import('org.wso2.iot.DeviceInfoStream:1.0.0') define stream inputStreaminput (meta_deviceId string, meta_deviceType string, timeStamp long, imei string, imsi string, deviceModel string, vendor string, osVersion string, osBuildDate string, batteryLevel double, totalInternalMemory double, availableInternalMemory double, totalExternalMemory double, availableExternalMemory double, operator string, connectionType string, mobileSignalStrength double, ssid string, cpuUsage double, totalRAM double, availableRAM double, pluggedIn bool); @Export('org.wso2.iot.BatteryStream:1.0.0') define stream outputStreamoutput (meta_deviceId string, meta_deviceType string, meta_timestamp long, level double, year int, month int, day int, hour int, minute int); from inputStreaminput select meta_deviceId, meta_deviceType, timeStamp as meta_timestamp, batteryLevel as level, time:extract(time:timestampInMilliseconds(), 'year') as year, time:extract(time:timestampInMilliseconds(), 'month') as month, time:extract(time:timestampInMilliseconds(), 'day') as day, time:extract(time:timestampInMilliseconds(), 'hour') as hour, time:extract(time:timestampInMilliseconds(), 'minute') as minute insert into outputStreamoutput;
- Click Add Execution Plan.
...