renamed stream names

revert-dabc3590
lasantha 8 years ago
parent e7268d1977
commit e4c8e37c7a

@ -2,9 +2,9 @@
<Analytics>
<Editable>true</Editable>
<Name>AndroidFrequentContactsScript</Name>
<Script> CREATE TEMPORARY TABLE AndroidFrequentCallData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_CALL_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_CALL_STATS, DAY");
<Script> CREATE TEMPORARY TABLE AndroidFrequentCallData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_CALL_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_CALL_STATS, DAY");
CREATE TEMPORARY TABLE AndroidFrequentSmsData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_SMS_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_SMS_STATS, DAY");
CREATE TEMPORARY TABLE AndroidFrequentSmsData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_SMS_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_SMS_STATS, DAY");
CREATE TEMPORARY TABLE Android_Frequent_Contacts_Per_Day USING CarbonAnalytics
OPTIONS (tableName "Android_Frequent_Contacts_Per_Day",
@ -34,8 +34,8 @@
GROUP BY meta_deviceId, meta_owner, number, year, month, day) smsData ON smsData.owner = callData.owner AND smsData.deviceId = callData.deviceId AND smsData.number = callData.number AND smsData.year = callData.year AND smsData.month = callData.month AND smsData.day = callData.day
ORDER BY total DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_CALL_STATS;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SMS_STATS;
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_CALL_STATS;
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_SMS_STATS;
INSERT INTO TABLE Android_Frequent_Contacts_Per_Month
SELECT owner, deviceId, number, sum(callCount) as callCount, sum(smsCount) as smsCount, sum(total) as total, year, month, getMonthStartingTime(year, month) as _timestamp

@ -2,7 +2,7 @@
<Analytics>
<Editable>true</Editable>
<Name>HeadsetScript</Name>
<Script>CREATE TEMPORARY TABLE AndroidHeadsetData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_HEADSET_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_HEADSET_STATS, DAY");
<Script>CREATE TEMPORARY TABLE AndroidHeadsetData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_HEADSET_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_HEADSET_STATS, DAY");
CREATE TEMPORARY TABLE Android_Headset_Stat_Per_Day USING CarbonAnalytics
OPTIONS (tableName "Android_Headset_Stat_Per_Day",
@ -15,7 +15,7 @@
FROM AndroidHeadsetData
GROUP BY year, month, day, meta_deviceId, meta_owner ORDER BY timestamp DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_HEADSET_STATS;
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_HEADSET_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -18,6 +18,6 @@
-->
<artifact name= "android_headset_stats_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_android_headset_stats.xml</file>
<file>iot_per_device_stream_android_headset_stats.xml</file>
</artifact>

@ -18,6 +18,6 @@
-->
<artifact name= "android_headset_stats_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.android.headset.stats_1.0.0.json</file>
<file>iot.per.device.stream.android.headset.stats_1.0.0.json</file>
</artifact>

@ -2,10 +2,10 @@
@Plan:description('Process light changes.')
@Import('org.wso2.iot.android.light:1.0.0')
@Import('iot.per.device.stream.android.light:1.0.0')
define stream LightStream (meta_owner string, meta_deviceId string, meta_timestamp long, light float);
@Export('org.wso2.iot.android.light.stats:1.0.0')
@Export('iot.per.device.stream.android.light.stats:1.0.0')
define stream LightStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, light float, year int,
month int, day int, hour int, minute int);

@ -18,6 +18,6 @@
-->
<artifact name= "android_light_stats_event_sink" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_android_light_stats.xml</file>
<file>iot_per_device_stream_android_light_stats.xml</file>
</artifact>

@ -18,6 +18,6 @@
-->
<artifact name= "android_light_stats_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.android.light.stats_1.0.0.json</file>
<file>iot.per.device.stream.android.light.stats_1.0.0.json</file>
</artifact>

@ -18,6 +18,6 @@
-->
<artifact name= "android_light_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.android.light_1.0.0.json</file>
<file>iot.per.device.stream.android.light_1.0.0.json</file>
</artifact>

Loading…
Cancel
Save