Created 03-20-2017 01:29 PM
Hello All,
I have column like '5060-5070' in pig and I want to write a udf to return tuples as below:
col1 and col2 will be same in all the tuples.
col1,col2,5060,....
col1,col2,5061,..
col1,col2,5062,..
or if there is any alternative (instead of using udf) to create multiple tuples from single tuple .
kindly help...!!
Created 03-28-2017 07:45 PM
I do not believe there is a way to do this in "native" Pig Latin and you will need to introduce a UDF.
Created 03-30-2017 06:31 AM
yeah... i wrote a udf and its working absolutely fine.thnx
Created 03-28-2017 08:12 PM
I cant think of anyway other than creating a udf in pig. Whereas in hive it can achieved easily with array as datatype along with lateral view explode option.
Created 03-30-2017 06:32 AM
In hive its seems to be easy..but i had to do the same in pig, so I wrote udf, anyways thnx 🙂