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

ClassCastException

2014-04-23 Thread Steven E. Waldren
Hello, New to pig/hadoop. Using Cloudera CDH5. I have some weird behavior that I am trying to figure out. I am trying to JOIN two relations and I get the error below stating DataByteArray cannot be case to String. I load the first relation with a schema where $0 is nppes:char array and have