blob: 1a445bf3c00ff322a5be21e14f6db00d2e643dc1 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse test if exists;
vinayakb38b7ca42012-03-05 05:44:15 +00002create dataverse test;
3use dataverse test;
4
5create type LineItemType as closed {
6 l_orderkey: int32,
7 l_partkey: int32,
8 l_suppkey: int32,
9 l_linenumber: int32,
10 l_quantity: int32,
11 l_extendedprice: double,
12 l_discount: double,
13 l_tax: double,
14 l_returnflag: string,
15 l_linestatus: string,
16 l_shipdate: string,
17 l_commitdate: string,
18 l_receiptdate: string,
19 l_shipinstruct: string,
20 l_shipmode: string,
21 l_comment: string
22}
23
vinayakb38b7ca42012-03-05 05:44:15 +000024create dataset LineItem(LineItemType)
khfaraaz82@gmail.com502731f2012-05-02 20:38:16 +000025 partitioned by key l_orderkey, l_linenumber;
vinayakb38b7ca42012-03-05 05:44:15 +000026
27load dataset LineItem
28using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
29(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
30
vinayakb38b7ca42012-03-05 05:44:15 +000031delete $l from dataset LineItem where $l.l_orderkey>=10;
32
alexander.behma098ddb2012-05-03 02:07:46 +000033write output to nc1:"rttest/dml_delete-from-loaded-dataset.adm";
vinayakb38b7ca42012-03-05 05:44:15 +000034for $c in dataset('LineItem')
35order by $c.l_orderkey, $c.l_linenumber
36return $c