blob: b0fd4c9b82e1d84bc2947ca4476b85a33d5385c3 [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)
ramangrover29669d8f62013-02-11 06:03:32 +000027 primary key cid on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000028
29load dataset Customers
Ian Maxonf18bba22015-08-21 12:35:14 -070030using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
vinayakb38b7ca42012-03-05 05:44:15 +000031(("path"="nc1://data/custord-tiny/customer-tiny.adm"),("format"="adm")) pre-sorted;