Hey all, 4 hours of true torture, hope you will help me (the task is easy)

up = LOAD '/up.log' USING PigStorage(',') AS (upEpoch:long, 
upInstance:chararray,  upKeyword:chararray);
tx = LOAD '/tx.log' USING PigStorage(',') AS (txEpoch:long, 
txInstance:chararray, txKeyword:chararray);
recordGroup = COGROUP up BY (upInstance), tx BY (txInstance);

recordExtract = FOREACH recordGroup {
                recordFiltered = FILTER up BY upEpoch < tx.txEpoch;
                recordLimited = LIMIT recordFiltered 1;
                GENERATE
                                recordLimited
                ;
}

How do I point PIG to my tx input with txEpoch field (from recordGroup)? 
tx::txEpoch, tx.txEpoch, txEpoch, recordGroup::tx.txEpoch doesn't work...

Always the same, with tx::txEpoch - "ERROR 1000: Error during parsing. Invalid 
alias: tx::txEpoch in {upEpoch: long,upInstance: chararray,upKeyword: 
chararray}"

Or with tx.txEpoch (I know it takes tx = LOAD as a source, but I need 
recordGroup::tx.txEpoch!) - "ERROR 2997: Unable to recreate exception from 
backed error: org.apache.pig.backend.executionengine.ExecException: ERROR 0: 
Scalar has more than one row in the output. 1st : (1314835200050,99,sam), 2nd 
:(1314835200079,99,flin)"

Reply via email to