Hi All,
I have a question regarding restructuring records in Pig. I have a data
set which looks something like:

(user, nAddresses, address1, address2, phone, ...)

I want to collapse the addressX group of fields into a bag, like:

(user, (address1, address2, ...), phone, ...)

Is there a way to do this with Pig's built-in functions or operators? 

Project-Range expressions get me close, but I don't see a way to do
something like: ($0, $3 .. $$1, $4, ...).

I looked at writing a UDF, but I don't see a model for this. Do all UDFs
return only scalars or booleans, but not bags?

Thanks,
  -Erik Burrows


Reply via email to