mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Renamed location and screen stream names
This commit is contained in:
parent
705013b5fd
commit
9b02e40e18
@ -2,10 +2,10 @@
|
||||
|
||||
@Plan:description('Find the street name of the location and add to a new stream')
|
||||
|
||||
@Import('org.wso2.iot.android.location:1.0.0')
|
||||
@Import('iot.per.device.stream.android.location:1.0.0')
|
||||
define stream LocationStream (meta_owner string, meta_deviceId string, meta_timestamp long, latitude double, longitude double);
|
||||
|
||||
@Export('org.wso2.iot.android.location.stats:1.0.0')
|
||||
@Export('iot.per.device.stream.android.location.stats:1.0.0')
|
||||
define stream LocationStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, latitude double, longitude double, streetName string, year int, month int, day int, hour int, minute int);
|
||||
|
||||
partition with (meta_deviceId of LocationStream)
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
@Plan:description('Identify screen on duration')
|
||||
|
||||
|
||||
@Import('org.wso2.iot.android.screen:1.0.0')
|
||||
@Import('iot.per.device.stream.android.screen:1.0.0')
|
||||
define stream ScreenStream (meta_owner string, meta_deviceId string, meta_timestamp long, state string);
|
||||
|
||||
@Export('org.wso2.iot.android.screen.stats:1.0.0')
|
||||
@Export('iot.per.device.stream.android.screen.stats:1.0.0')
|
||||
define stream ScreenStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, duration long, year int, month int, day int, hour int, minute int);
|
||||
|
||||
partition with (meta_deviceId of ScreenStream)
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_location_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
|
||||
<file>org_wso2_iot_android_location.xml</file>
|
||||
<file>iot_per_device_stream_android_location.xml</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<Analytics>
|
||||
<Editable>true</Editable>
|
||||
<Name>LocationScript</Name>
|
||||
<Script> CREATE TEMPORARY TABLE AndroidLocationData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_LOCATION_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_LOCATION_STATS, DAY");
|
||||
<Script> CREATE TEMPORARY TABLE AndroidLocationData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_LOCATION_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_LOCATION_STATS, DAY");
|
||||
|
||||
CREATE TEMPORARY TABLE Android_Location_Stats_Per_Day USING CarbonAnalytics
|
||||
OPTIONS (tableName "Android_Location_Stats_Per_Day",
|
||||
@ -27,7 +27,7 @@
|
||||
FROM AndroidLocationData
|
||||
GROUP BY year, month, day, meta_deviceId, streetName, meta_owner, latitude, longitude;
|
||||
|
||||
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_LOCATION_STATS;
|
||||
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_LOCATION_STATS;
|
||||
|
||||
INSERT INTO TABLE Android_Location_Stats_Per_Month
|
||||
SELECT owner, deviceId, latitude, longitude, streetName, sum(noOfVisits) as noOfVisits, year, month, getMonthStartingTime(year, month) as _timestamp
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_location_stats_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
|
||||
<file>org_wso2_iot_android_location_stats.xml</file>
|
||||
<file>iot_per_device_stream_android_location_stats.xml</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_location_stats_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||
<file>org.wso2.iot.android.location.stats_1.0.0.json</file>
|
||||
<file>iot.per.device.stream.android.location.stats_1.0.0.json</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_location_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||
<file>org.wso2.iot.android.location_1.0.0.json</file>
|
||||
<file>iot.per.device.stream.android.location_1.0.0.json</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<Analytics>
|
||||
<Editable>true</Editable>
|
||||
<Name>AndroidScreenScript</Name>
|
||||
<Script> CREATE TEMPORARY TABLE AndroidScreenData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_SCREEN_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_SCREEN_STATS, DAY");
|
||||
<Script> CREATE TEMPORARY TABLE AndroidScreenData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_SCREEN_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_SCREEN_STATS, DAY");
|
||||
|
||||
CREATE TEMPORARY TABLE Android_Screen_Stat_Per_Day USING CarbonAnalytics
|
||||
OPTIONS (tableName "Android_Screen_Stat_Per_Day",
|
||||
@ -15,7 +15,7 @@
|
||||
FROM AndroidScreenData
|
||||
GROUP BY year, month, day, meta_deviceId, meta_owner ORDER BY timestamp DESC;
|
||||
|
||||
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SCREEN_STATS;
|
||||
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_SCREEN_STATS;
|
||||
</Script>
|
||||
<CronExpression>0 0/5 * * * ?</CronExpression>
|
||||
</Analytics>
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_screen_stats_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
|
||||
<file>org_wso2_iot_android_screen_stats.xml</file>
|
||||
<file>iot_per_device_stream_android_screen_stats.xml</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_screen_stats_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||
<file>org.wso2.iot.android.screen.stats_1.0.0.json</file>
|
||||
<file>iot.per.device.stream.android.screen.stats_1.0.0.json</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
-->
|
||||
|
||||
<artifact name= "android_screen_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||
<file>org.wso2.iot.android.screen_1.0.0.json</file>
|
||||
<file>iot.per.device.stream.android.screen_1.0.0.json</file>
|
||||
</artifact>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user