|
|
|
@ -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>
|
|
|
|
|