blob: 6cee221ed62866531a7fc3c6b364dc4b56cd0f28 [file] [log] [blame]
buyingyi76ad6c42013-04-27 21:02:30 -07001drop dataverse tpch if exists;
2create dataverse tpch;
3
4use dataverse tpch;
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
25create dataset LineItem(LineItemType)
26 primary key l_orderkey, l_linenumber;
27
28write output to nc1:"/tmp/push_limit.adm";
29
30for $l in dataset('LineItem')
31limit 2
32return {
33"l_returnflag": $l.l_returnflag,
34"l_linestatus": $l.l_linestatus,
35"l_shipmode": $l.l_shipmode
36}
37