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