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 |
Ian Maxon | f18bba2 | 2015-08-21 12:35:14 -0700 | [diff] [blame^] | 30 | using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter" |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 31 | (("path"="nc1:///tmp/customerData.json"),("format"="adm")) pre-sorted; |
| 32 | |