How do I flatten bag after group?

2014-04-23 Thread Patcharee Thongtra
Hi, From the schema C: {group: (int,int,int),{(varvalue: {t: (varname: chararray,shape: float)})}} I would like to get {int,int,int,(varname,shape)}, where there are multiple varname and shape value of each varname. How can I write the pig script to generate that? Patcharee

Re: How do I flatten bag after group?

2014-04-23 Thread Dan DeCapria, CivicScience
Hi Patcharee, I took some liberties and constructed your starting condition 'C' from a well formed A and B, as detailed below. Aliases D and E resolve the inner flattens as expected. A = LOAD '/MYINPUTDIR' USING PigStorage('\t', '-noschema') AS