Hi ,

I am new to Pig, would like to know how to work with nested bag. I tried 
with the sample code and am getting an empty output .

Thanks,
Sankar 

Data
(a,{(1,1,1)})
(b,{(2,2,2),(3,3,3)})
(c,{(4,4,4),(5,5,5),(6,6,6)})

Query
grunt>A = LOAD 'data' AS (c1:chararray,b1: bag {t1: tuple(i1:int, i2:int, 
i3:int)});
grunt>B = foreach A generate b1;
grunt> dump B;

Output
()
()
()

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply via email to