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