The method you’re looking for is PigStats.result(String alias) which returns a 
OutputStats object.

Here is an example:

R = Pig.compile(...).bind(...).runSingle()
iter = R.result(“G”).iterator()
while iter.hasNext():
    t = iter.next()
    ....

On 1/17/11 9:34 PM, "김영우" <[email protected]> wrote:

Hi All,

I'm looking into embedding pig latin in a host language using pig trunk. so
far, basic features work fine for me. but I need to know how can I get
result tuples from the stored bag.
I need to apply some processing to each tuple from result bag. In wiki
http://wiki.apache.org/pig/TuringCompletePig , It seems 'getResults()'
method works like what I want. but I got an error like "returned PigStats
has no attribute 'getResults()' ..."

Any advice would be appreciated.

- Youngwoo

Reply via email to