blob: ae6b28ffdc57b18dcd361d979ec01d89ffcd4e42 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001use dataverse events;
2
3declare type UserType as open {
4 name: string,
5 email: string,
6 interests: {{string}},
7 address: AddressType,
8 member_of: {{
9 {
10 sig_name: string,
11 chapter_name: string,
12 member_since: date
13 }
14 }}
15}
16
17declare type AddressType as closed {
18 street: string,
19 city: string,
20 zip: string,
21 latlong: point
22}
23
24declare nodegroup group1 on nc1, nc2;
25
26declare dataset User(UserType) partitioned by key name on group1;
27
28write output to nc1:"/tmp/q1.adm";
29
30for $user in dataset('User')
31where some $i in $user.interests
32 satisfies $i = "movies"
33return {"name": $user.name}