mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
refactored Android activity artifacts
This commit is contained in:
parent
1518ef2d54
commit
f4aad41a34
@ -2,7 +2,7 @@
|
|||||||
<Analytics>
|
<Analytics>
|
||||||
<Editable>true</Editable>
|
<Editable>true</Editable>
|
||||||
<Name>AndroidActivityScript</Name>
|
<Name>AndroidActivityScript</Name>
|
||||||
<Script> CREATE TEMPORARY TABLE AndroidActivityData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_ACTIVITY_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_ACTIVITY_STATS, DAY");
|
<Script> CREATE TEMPORARY TABLE AndroidActivityData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_ACTIVITY_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_ACTIVITY_STATS, DAY");
|
||||||
|
|
||||||
CREATE TEMPORARY TABLE Android_Activity_Stat_Per_Day USING CarbonAnalytics
|
CREATE TEMPORARY TABLE Android_Activity_Stat_Per_Day USING CarbonAnalytics
|
||||||
OPTIONS (tableName "Android_Activity_Stat_Per_Day",
|
OPTIONS (tableName "Android_Activity_Stat_Per_Day",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
FROM AndroidActivityData WHERE action = 'RUNNING' OR action = 'WALKING' OR action = 'CYCLING'
|
FROM AndroidActivityData WHERE action = 'RUNNING' OR action = 'WALKING' OR action = 'CYCLING'
|
||||||
GROUP BY year, month, day, meta_deviceId, action, meta_owner ORDER BY timestamp ASC;
|
GROUP BY year, month, day, meta_deviceId, action, meta_owner ORDER BY timestamp ASC;
|
||||||
|
|
||||||
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_ACTIVITY_STATS;
|
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_ACTIVITY_STATS;
|
||||||
</Script>
|
</Script>
|
||||||
<CronExpression>0 0/5 * * * ?</CronExpression>
|
<CronExpression>0 0/5 * * * ?</CronExpression>
|
||||||
</Analytics>
|
</Analytics>
|
||||||
|
|||||||
@ -18,6 +18,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<artifact name= "android_activity_stats_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
|
<artifact name= "android_activity_stats_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
|
||||||
<file>org_wso2_iot_android_activity_stats.xml</file>
|
<file>iot_per_device_stream_android_activity_stats.xml</file>
|
||||||
</artifact>
|
</artifact>
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<artifact name= "android_activity_stats_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
<artifact name= "android_activity_stats_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||||
<file>org.wso2.iot.android.activity.stats_1.0.0.json</file>
|
<file>iot.per.device.stream.android.activity.stats_1.0.0.json</file>
|
||||||
</artifact>
|
</artifact>
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<artifact name= "android_activity_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
<artifact name= "android_activity_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||||
<file>org.wso2.iot.android.activity_1.0.0.json</file>
|
<file>iot.per.device.stream.android.activity_1.0.0.json</file>
|
||||||
</artifact>
|
</artifact>
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
@Plan:description('Identify the start and end of each activities')
|
@Plan:description('Identify the start and end of each activities')
|
||||||
|
|
||||||
@Import('org.wso2.iot.android.activity:1.0.0')
|
@Import('iot.per.device.stream.android.activity:1.0.0')
|
||||||
define stream ActivitySream (meta_owner string, meta_deviceId string, meta_timestamp long, action string);
|
define stream ActivitySream (meta_owner string, meta_deviceId string, meta_timestamp long, action string);
|
||||||
|
|
||||||
@Export('org.wso2.iot.android.activity.stats:1.0.0')
|
@Export('iot.per.device.stream.android.activity.stats:1.0.0')
|
||||||
define stream ActivityStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, action string, duration long, year int, month int, day int, hour int, minute int);
|
define stream ActivityStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, action string, duration long, year int, month int, day int, hour int, minute int);
|
||||||
|
|
||||||
partition with (meta_deviceId of ActivitySream)
|
partition with (meta_deviceId of ActivitySream)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user