Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Accessing tuple field names from within a python udf


Copy link to this message
-
Accessing tuple field names from within a python udf
I normally deal with very large tuples with many fields. Its a pain to deal
with these in python udfs since I can't figure out a way to input schemas
into the udf. I have to hard code the column number in the UDFs, which is a
maintenance nightmare.

It seems that java UDFs receive the full tuple in their exec methods so
that the correct fields can be identified, whereas python UDFs only receive
lists objects (with field names stripped). Is there any way to get the
behaviour of python UDFs to conform to the java behaviour?
Thanks for any ideas
Martin