Re: Unable to access Map within a tuple.

2011-03-29 Thread deepak kumar v
Passing * to UDF did the trick. Thank you. Deepak On Tue, Mar 29, 2011 at 11:42 AM, deepak kumar v wrote: > The problem is schema is lost after flattening. > > inputBag has schema of {outTuple : (channelMap: map [ ] ) } > > However after flattening the schema is > > flatTuples : {data : chararra

Re: Unable to access Map within a tuple.

2011-03-28 Thread deepak kumar v
The problem is schema is lost after flattening. inputBag has schema of {outTuple : (channelMap: map [ ] ) } However after flattening the schema is flatTuples : {data : chararray} How can we specify schema for a call to flatten. On Wed, Mar 23, 2011 at 11:35 PM, Daniel Dai wrote: > 2) should

Re: Unable to access Map within a tuple.

2011-03-23 Thread Daniel Dai
2) should be the right approach, more concisely, you can say: processed = foreach flatTuple generate com.myUDF.UDF(*) It seems to be something wrong with your schema propagation. How do you generate inputBag? If it is generated by UDF, make sure your UDF declare proper output schema. You can ch

Re: Unable to access Map within a tuple.

2011-03-22 Thread deepak kumar v
Hi Daniel, I have a bag of tuples inputBag = { (day, age, name, address, ['k1#v1','k2#v2']), (12/2,22,deepak,newyork, ['k1#v1','k2#v2']), (12/3,22,deepak,newjersy, ['k1#v1','k2#v2']) } I need to invoke a UDF for each tuple, so i have to flatten the bag which i do as flatTuples = foreach input

Re: Unable to access Map within a tuple.

2011-03-17 Thread Daniel Dai
Hi, Deepak, Can you be more specific? I did some simple test and cannot reproduce. What is your query? UDF? Daniel On 03/16/2011 11:24 PM, deepak kumar v wrote: Hi, Below are list of tuples generated after flattening a bag . (day, age, name, address, ['k1#v1','k2#v2']), (12/2,22,deepak,newy

Unable to access Map within a tuple.

2011-03-16 Thread deepak kumar v
Hi, Below are list of tuples generated after flattening a bag . (day, age, name, address, ['k1#v1','k2#v2']), (12/2,22,deepak,newyork, ['k1#v1','k2#v2']), (12/3,22,deepak,newjersy, ['k1#v1','k2#v2']) process = foreach inputs generate com.yahoo.peblpig.udf.InvokeProcess($0); Here $0 some how ge