Sunday, 18 August 2013

For Apache Pig, how do I write a Load UDF in python

For Apache Pig, how do I write a Load UDF in python

I want to write a Python UDF Load function for Apache Pig, so that I can
use it in the following way in a Pig script:
register 'myudfs.py' using jython as myfuncs;
A = load 'data' using myfuncs.myLoader() as line;
The Pig documentation provides some detail for writing Load UDFs in Java,
but not in Python. I have managed to implement quite useful Eval functions
with Python, but I couldn't find anything about how to write Load
functions in this language.
Because I have already implemented a few Eval UDFs in Python, I would like
to stick to this language for all my UDFs.

No comments:

Post a Comment