blob: d55dfed62c929d0f238d2b5f1e879a5831aadb76 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse custord if exists;
2create dataverse custord;
3use dataverse custord;
4
5
6create type AddressType as open {
7 number: int32,
8 street: string,
9 city: string
10}
11
12create type CustomerType as open {
13 cid: int32,
14 name: string,
15 age: int32?,
16 address: AddressType?,
17 lastorder: {
18 oid: int32,
19 total: float
20 }
21}
22
23
24create nodegroup group1 if not exists on nc1, nc2;
25
26create dataset Customers(CustomerType)
27 partitioned by key cid on group1;
28
29load dataset Customers
30using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
31(("path"="nc1://data/custord-tiny/customer-tiny.adm"),("format"="adm")) pre-sorted;