Say I’m loading in a bag into Pig without a schema file. I know that each tuple in the bag contains 1 field, which is also a bag, e.g.
{
({1, 2, 3}),
({3,4,5}),
({1,2})
}
I would like to cast each tuple’s first argument into a bag. How can I do so?
data = LOAD '/path/to/data' AS (f:bytearray);
data2 = FOREACH data GENERATE (bag)f; -- this doesn't work
1 Answer