blob: bcd0a0dcd055c51c3b328032092079d035fe920e [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
vinayakb38b7ca42012-03-05 05:44:15 +000019create dataset Users(UserType)
buyingyi56024462013-07-16 20:35:55 -070020 primary key uid;
vinayakb38b7ca42012-03-05 05:44:15 +000021
22create dataset Visitors(VisitorType)
buyingyi56024462013-07-16 20:35:55 -070023 primary key vid;
vinayakb38b7ca42012-03-05 05:44:15 +000024
25
26write output to nc1:"/tmp/fuzzy1.adm";
27
28for $user in dataset('Users')
29for $visitor in dataset('Visitors')
30where $user.uid = $visitor.vid
31return { "user_name" : $user.name, "visitor_name" : $visitor.name }