vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | drop dataverse test if exists; |
| 2 | create dataverse test; |
| 3 | use dataverse test; |
| 4 | |
| 5 | create type OrderType as open { |
| 6 | oid: int32, |
| 7 | cid: int32, |
| 8 | orderstatus: string, |
| 9 | orderpriority: string, |
| 10 | clerk: string, |
| 11 | total: float |
| 12 | } |
| 13 | |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 14 | create external dataset Orders(OrderType) |
| 15 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 16 | (("path"="nc1://data/semistructured/tiny01/orders.adm"),("format"="adm")); |
| 17 | |
| 18 | write output to nc1:"rttest/semistructured_has-param1.adm"; |
| 19 | |
| 20 | for $o in dataset('Orders') |
| 21 | where not(is-null($o.param1)) |
| 22 | order by $o.oid |
| 23 | return $o |