[storm] multiple join's

Gordon Allott gordallott at gmail.com
Wed Jan 14 22:56:52 GMT 2009


Hi,

I have a small problem understanding the join system in storm, If we
take the join example in the tutorial,
( https://storm.canonical.com/Tutorial#Joins ) it involves a scenario
where there is an Employee table and Company table, employee's reference
companies and it suggest the following code to select companies that the
employee 'Ben' belongs to:
"""
>>> origin = [Company, Join(Employee, Employee.company_id ==
Company.id)]
>>> result = store.using(*origin).find(Company, Employee.name.like(u"Ben
%"))

>>> [company.name for company in result]
[u'Sweets Inc.']
"""

Which works great, but in my situation I would have to find more than
one employee, for example, I may need to find the companies that 'Ben',
'Steve' and 'John' all belong to but am not quite sure how to go about
doing that, just adding more clauses to the find query regarding the
other employee's does not work.

Thanks, Gord
-- 
Gordon Allott (gordallott at gmail.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/storm/attachments/20090114/8112ff7b/attachment.pgp 


More information about the storm mailing list