diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql index 743ec44f31..76ed3cde93 100755 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql @@ -3,10 +3,7 @@ @Plan:description('ExecutionPlan') @Import('org.wso2.iot.android.sense:1.0.0') -define stream AndroidSense (meta_owner string, meta_deviceId string, meta_type string, meta_timestamp long, battery int, battery_state string, battery_status string, battery_temperature int, gps_lat double, gps_long double, accelerometer_x float, accelerometer_y float, accelerometer_z float, speed_limit float, turn_way string, magnetic_x float, magnetic_y float, magnetic_z float, gyroscope_x float, gyroscope_y float, gyroscope_z float, light float, pressure float, proximity float, gravity_x float, gravity_y float, gravity_z float, rotation_x float, rotation_y float, rotation_z float, word string, word_sessionId string, word_status string, beacon_major int, beacon_minor int, beacon_proximity string, beacon_uuid int, call_number string, call_type string, call_start_time long, call_end_time long, screen_state string, audio_playing bool, headset_on bool, music_volume int, activity_type int, confidence int, sms_number string, application_name string, action string, data_type string, data_sent long, data_received long); - -@Export('org.wso2.iot.android.data:1.0.0') -define stream DataStream (meta_owner string, meta_deviceId string, meta_timestamp long, type string, received long, sent long); +define stream AndroidSense (meta_owner string, meta_deviceId string, meta_type string, meta_timestamp long, battery int, battery_state string, battery_status string, battery_temperature int, gps_lat double, gps_long double, accelerometer_x float, accelerometer_y float, accelerometer_z float, speed_limit float, turn_way string, magnetic_x float, magnetic_y float, magnetic_z float, gyroscope_x float, gyroscope_y float, gyroscope_z float, light float, pressure float, proximity float, gravity_x float, gravity_y float, gravity_z float, rotation_x float, rotation_y float, rotation_z float, word string, word_sessionId string, word_status string, beacon_major int, beacon_minor int, beacon_proximity string, beacon_uuid int, call_number string, call_type string, call_start_time long, call_end_time long, screen_state string, audio_playing bool, headset_on bool, music_volume int, activity_type int, confidence int, sms_number string, application_name string, action string); @Export('org.wso2.iot.android.activity:1.0.0') define stream ActivityStream (meta_owner string, meta_deviceId string, meta_timestamp long, action string); @@ -29,6 +26,8 @@ define stream BatteryStream (meta_owner string, meta_deviceId string, meta_times @Export('org.wso2.iot.android.sms:1.0.0') define stream SmsStream (meta_owner string, meta_deviceId string, meta_timestamp long, number string, type string, body string); +@Export('org.wso2.geo.LocationStream:1.0.0') +define stream geoLocationStream (id string, timeStamp long, latitude double, longitude double, type string, speed float, heading float); from AndroidSense[meta_type == 'sms'] select meta_owner, meta_deviceId, meta_timestamp, sms_number as number, action as type, "" as body @@ -42,7 +41,7 @@ from AndroidSense[meta_type == 'audio'] select meta_owner, meta_deviceId, meta_timestamp, audio_playing, headset_on, music_volume insert into AudioStream; -from AndroidSense[meta_type == 'location'] +from AndroidSense[meta_type == 'gps'] select meta_owner, meta_deviceId, meta_timestamp, gps_lat as latitude, gps_long as longitude insert into LocationStream; @@ -58,6 +57,6 @@ from AndroidSense[meta_type == 'activity'] select meta_owner, meta_deviceId, meta_timestamp, action insert into ActivityStream; -from AndroidSense[meta_type == 'data'] -select meta_owner, meta_deviceId, meta_timestamp, data_type as type, data_received as received, data_sent as sent -insert into DataStream; \ No newline at end of file +from AndroidSense[meta_type == 'gps'] +select meta_deviceId as id, meta_timestamp as timeStamp, gps_lat as latitude, gps_long as longitude, "android_sense" as type, speed_limit as speed, 0.0f as heading +insert into geoLocationStream;