blob: f70de1487430296af81aea7394ab7b402c6e3a10 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse demo0927 if exists;
2
3create dataverse demo0927;
4
5use dataverse demo0927;
6
7create type CustomerType as closed {
8 cid: int32,
9 name: string,
10 age: int32?,
11 address: AddressType?,
12 lastorder: {
13 oid: int32,
14 total: float
15 }
16}
17
18create type AddressType as closed {
19 number: int32,
20 street: string,
21 city: string
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:///tmp/customerData.json"),("format"="adm")) pre-sorted;
32