Queries
The most basic query in Bud is the implicit map (in ruby).
t.key: its key
t.value: its value
|t| each table element in turn
t2 becomes the table with only keys > 5. 
t2 <~ t1 {|t| t if t.key>5} 
In Pig, this is equivalent with FILTER -- BY
literally, for every t in t1, produce [t.key+1,t.value]
t2 is the array with one greater index than t1.
t2 <~ t1 {|t| [t.key+1,t.value]}
In Pig, this is equivalent with FOREACH -- GENERATE.
(Do something to every element of a table, return the result) 
Schemas are determined by the commands. 
Schema mismatches during merges are fatal. 
Some notes: 
Wednesday, April 27, 2011
12:34 PM