I have a Pig script which generated a relation
A: {x: chararray,B: {(y: chararray,z: int)}}
I want to sort A based on B.y, however the following piece gives me error:
Syntax error, unexpected symbol at or near z
output = foreach A{
sorted = order B by z DSC;
generate x,sorted;
}
Use DESC instead of DSC.
e.g.
output = foreach A{
sorted = order B by z DESC;
generate x,sorted;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With