blob: 04111455c92f76a299c57f42dbb313815af0e9f4 [file] [log] [blame]
buyingyic1df1962012-04-25 21:37:23 +00001drop dataverse test if exists;
buyingyic1df1962012-04-25 21:37:23 +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: double,
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
buyingyic1df1962012-04-25 21:37:23 +000024create dataset LineItem(LineItemType)
khfaraaz82@gmail.com502731f2012-05-02 20:38:16 +000025 partitioned by key l_orderkey, l_linenumber;
buyingyic1df1962012-04-25 21:37:23 +000026
buyingyic1df1962012-04-25 21:37:23 +000027load dataset LineItem
28using "edu.uci.ics.asterix.external.dataset.adapter.HDFSAdapter"
29(("hdfs"="hdfs://localhost:10009"),("path"="/tpch/lineitem.tbl"),
30("input-format"="text-input-format"),("format"="delimited-text"),("delimiter"="|"));
31
32write output to nc1:"rttest/dml_load-from-hdfs.adm";
33for $c in dataset('LineItem')
34order by $c.l_orderkey, $c.l_linenumber
35return $c
36