blob: a7cf0a4046aab794043ad7de444b81e75403b90f [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001use dataverse fuzzy1;
2
3declare type UserType as open {
4 uid: {{int32}},
5 name: string,
6 lottery_numbers: {{int32}},
7 interests: {{string}}
8}
9
10declare type VisitorType as open {
11 vid: {{int32}},
12 name: string,
13 lottery_numbers: {{int32}},
14 interests: {{string}}
15}
16
17declare nodegroup group1 on nc1, nc2;
18
19declare dataset Users(UserType)
20 partitioned by key uid on group1;
21declare dataset Visitors(VisitorType)
22 partitioned by key vid on group1;
23
24write output to nc1:'/tmp/users-visitors.adm';
25
26set simthreshold '.5';
27
28for $user in dataset('Users')
29for $visitor in dataset('Visitors')
30where $user.interests ~= $visitor.interests
31return { 'user': $user, 'visitor': $visitor }