refactored Android activity artifacts

revert-dabc3590
lasantha 8 years ago
parent 1518ef2d54
commit f4aad41a34

@ -2,7 +2,7 @@
<Analytics>
<Editable>true</Editable>
<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
OPTIONS (tableName "Android_Activity_Stat_Per_Day",
@ -26,7 +26,7 @@
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;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_ACTIVITY_STATS;
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_ACTIVITY_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -18,6 +18,6 @@
-->
<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>

@ -18,6 +18,6 @@
-->
<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>

@ -18,6 +18,6 @@
-->
<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>

@ -2,10 +2,10 @@
@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);
@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);
partition with (meta_deviceId of ActivitySream)

Loading…
Cancel
Save