I've seen this asked but I haven't seen an answer yet..
Is it possible to call a UDF from pig just a single time?
I basically want the transformation of a text file I store to handled by a single call to the java UDF. The internals of the transformation are easier to handle within Java, and the overhead is small, so I'd rather not convert the logic to pig..
The only way i've successfully called a UDF is as part of a FOREACH statement over some dataset. I thought that I could just create a dummy tuple that was of size one, then use this as part of the 'foreach', but I can't figure out the syntax to create this dummy tuple either..
The UDF does not need to return anything, it will handle the FS logic itself, I just want to be able to exec it from within the pig script as it makes more sense to instrument it here then as part of the greater workflow..
Any help would be greatly appreciated! Thanks!