Markus Resch 2012-03-14, 12:41
-Re: Best Practice: How to encapsulate frequently used native pig code to "methods"
Pig has support for macros; take a look at DEFINE (macro) and IMPORT here:
On Wed, Mar 14, 2012 at 8:41 AM, Markus Resch <[EMAIL PROTECTED]>wrote:
> Hi everyone,
> In future we are going to have a bunch of Pig scripts in parallel which
> are doing different stuff. In front of that special code we are going to
> have a very common "pre-filtering part" which I don't like to copy
> manually all over. I also don't like to use UDFs (as long as I can avoid
> them) because of my concerns about the optimization. I think I can doo
> all that filtering in native Pig code.
> What is the most common way to encapsulate such stuff in some kind of
> "methods" wich are returning relations just like the native calls do?