| drop dataverse demo0927 if exists; |
| |
| create dataverse demo0927; |
| |
| use dataverse demo0927; |
| |
| create type CustomerType as closed { |
| cid: int32, |
| name: string, |
| age: int32?, |
| address: AddressType?, |
| lastorder: { |
| oid: int32, |
| total: float |
| } |
| } |
| |
| create type AddressType as closed { |
| number: int32, |
| street: string, |
| city: string |
| } |
| |
| create nodegroup group1 if not exists on nc1, nc2; |
| |
| create dataset Customers(CustomerType) |
| primary key cid on group1; |
| |
| load dataset Customers |
| using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| (("path"="nc1:///tmp/customerData.json"),("format"="adm")) pre-sorted; |
| |