vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | drop dataverse demo0927 if exists; |
| 2 | |
| 3 | create dataverse demo0927; |
| 4 | |
| 5 | use dataverse demo0927; |
| 6 | |
| 7 | create 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 | |
| 18 | create type AddressType as closed { |
| 19 | number: int32, |
| 20 | street: string, |
| 21 | city: string |
| 22 | } |
| 23 | |
| 24 | create nodegroup group1 if not exists on nc1, nc2; |
| 25 | |
| 26 | create dataset Customers(CustomerType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame^] | 27 | primary key cid on group1; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 28 | |
| 29 | load dataset Customers |
| 30 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 31 | (("path"="nc1:///tmp/customerData.json"),("format"="adm")) pre-sorted; |
| 32 | |