Hi,

I am writing a Siddhi query to get the un-purchased books from an  event
table that has all  the books and a stream that contains  the already
bought books.

my quarry is like  this;

*userboughtbooks: *Stream that contains  the already bought books
*bookGroupTable: *Table that has all  the books
*RecommendationsOutputDataStream: *Out  put stream that contains  all
un-purchased books.

from userboughtbooks#window.time(10 min) join bookGroupTable
on  bookGroupTable.book_id  != userboughtbooks.book_id
select bookGroupTable.book_id
insert into RecommendationsOutputDataStream

1. when  userboughtbooks has one element it gives the correct result.

userboughtbooks: book1
bookGroupTable: book1, book2, book3, book4
RecommendationsOutputDataStream: book2, book3, book4

2. but  userboughtbooks has more than one element  gives the out put like
follows

userboughtbooks: book1, book2
bookGroupTable: book1, book2, book3, book4
RecommendationsOutputDataStream: book1,book2,book3,book3,book4,book4

I think behaviour of [2] , because of joining with  more than one element.

Is there a recommended way to accomplish this task?



Thanks and Best Regards,

Saneth Dharmakeerthi
Senior Software Engineer
WSO2, Inc.
Mobile: +94772325511
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to