blob: df7581158d62946c4dc9d6fadce0a82dc8aea8ce [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse test if exists;
2
3create dataverse test;
4use dataverse test;
5
6
7create type AddressType as closed {
8 street: string,
9 city: string,
10 zip: string,
11 latlong: point
12}
13
14create type UserType as open {
15 name: string,
16 email: string,
17 interests: {{string}},
18 address: AddressType,
19 member_of: {{
20 {
21 sig_id: int32,
22 chapter_name: string,
23 member_since: date
24 }
25 }}
26}
27
28create nodegroup group1 if not exists on nc1, nc2;
29
30create external dataset User(UserType)
31using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
32(("path"="nc1://data/events/tiny/user.adm"),("format"="adm"));
33
34write output to nc1:"rttest/dapd_q1.adm";
35
36for $user in dataset('User')
37where some $i in $user.interests
38 satisfies $i = "movies"
39return {"name": $user.name}