Reputation: 560
I have the following bag of data:
({(key1,value1),(key1,value2)}) ({(key2,value1),(key2,value1)})
The above data is stored in a file/relation & it has two rows of data where each row is a bag.
Is there a way of reading each bag emitting every tuple out of the bag?
Ex: Here I would like to emit (key1,value1) (key1,value2) (key2,value1) (key2,value2)
Please help. PIG is driving me crazy :( :(
Upvotes: 0
Views: 191
Reputation: 3078
FLATTEN() should do the trick :) http://pig.apache.org/docs/r0.12.1/basic.html#flatten
Upvotes: 1