blob: 4641c68e6e5c5be44f852912061ec668e1ccb016 [file] [log] [blame]
buyingyic1df1962012-04-25 21:37:23 +00001drop dataverse test if exists;
2
3create dataverse test;
4use dataverse test;
5
6create type LineItemType as closed {
7 l_orderkey: int32,
8 l_partkey: int32,
9 l_suppkey: int32,
10 l_linenumber: int32,
11 l_quantity: double,
12 l_extendedprice: double,
13 l_discount: double,
14 l_tax: double,
15 l_returnflag: string,
16 l_linestatus: string,
17 l_shipdate: string,
18 l_commitdate: string,
19 l_receiptdate: string,
20 l_shipinstruct: string,
21 l_shipmode: string,
22 l_comment: string
23}
24
buyingyic1df1962012-04-25 21:37:23 +000025create dataset LineItem(LineItemType)
khfaraaz82@gmail.com502731f2012-05-02 20:38:16 +000026 partitioned by key l_orderkey, l_linenumber;
buyingyic1df1962012-04-25 21:37:23 +000027
28//load dataset LineItem
29//using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
30//(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
31
32load dataset LineItem
33using "edu.uci.ics.asterix.external.dataset.adapter.HDFSAdapter"
34(("hdfs"="hdfs://localhost:10009"),("path"="/tpch/lineitem.tbl"),
35("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
36
37write output to nc1:"rttest/dml_load-from-hdfs.adm";
38for $c in dataset('LineItem')
39order by $c.l_orderkey, $c.l_linenumber
40return $c
41