Hi Ragavan, Have few questions regarding your requireemnt.
On Wed, Feb 17, 2016 at 3:05 PM, Ragavan Thiru <[email protected]> wrote: > > > What we have to find is, for a given ( fbid) if 2 or 3 or 4 *subsequent *slot > comes within a minute we need to trigger an endpoint. > > > > For example, given, > > "deviceId": "123", "fbid":"123890123890", > > 1. If slots 5, 6,7,4 > > OR slots 13,14 > > OR slots 2,4,3 comes I need to trigger an endpoint. > > AND so on. > > Understood this part. Basically if 2-4 subsequent slots come within one minute (even in out of order) you need to trigger an endpoint. > 2. If 1,3 or 1,2,3,4,5 or 5,8,9 comes or more than 4 slots comes we need to > trigger different endpoint and so on > > Is this like everything else other than which does not satisfy requirement 1 or something else? > I started like this, > > define stream event1Stream (topic string, fbId string,timestamp string,slot > int, deviceId string,deviceType string,eventType string,format string,_msgid > string); > > partition with ( fbId of event1Stream ) > > begin > > from event1Stream#window.timeBatch(1 min) > select fbId, deviceId, slot, count(slot) as slotCount > insert into #DeviceTempStream; > > > from #DeviceTempStream[slotCount > 4] > select fbId, deviceId, slot > insert into deviceTempStream; > end; > > Can you please help me to achieve the above scenario? > > > -- > Regards, > T.Ragavan. > -- Tishan Dahanayakage Software Engineer WSO2, Inc. Mobile:+94 716481328 Disclaimer: This communication may contain privileged or other confidential information and is intended exclusively for the addressee/s. If you are not the intended recipient/s, or believe that you may have received this communication in error, please reply to the sender indicating that fact and delete the copy you received and in addition, you should not print, copy, re-transmit, disseminate, or otherwise use the information contained in this communication. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
