blob: 26b5ab087b084b61363a310d01191caff3a25d05 [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)
ramangrover29669d8f62013-02-11 06:03:32 +000024 primary key uid on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000025
26create dataset Visitors(VisitorType)
ramangrover29669d8f62013-02-11 06:03:32 +000027 primary key vid on group2;
vinayakb38b7ca42012-03-05 05:44:15 +000028
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 }