blob: 3aa1855b5fe912d65677fe4c618ebad1c671f4b9 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse colocated if exists;
2
3create dataverse colocated;
4
5use dataverse colocated;
6
7create type UserType as open {
8 uid: int32,
9 name: string,
10 lottery_numbers: {{int32}}
11}
12
13create type VisitorType as open {
14 vid: int32,
15 name: string,
16 lottery_numbers: {{int32}}
17}
18
19create nodegroup group1 if not exists on nc1, nc2;
20
21create nodegroup group2 if not exists on nc2;
22
23create dataset Users(UserType)
24 partitioned by key uid on group1;
25
26create dataset Visitors(VisitorType)
27 partitioned by key vid on group2;
28
29
30write output to nc1:"/tmp/fuzzy1.adm";
31
32for $user in dataset('Users')
33for $visitor in dataset('Visitors')
34where $user.uid = $visitor.vid
35return { "user_name" : $user.name, "visitor_name" : $visitor.name }