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
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
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
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
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
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