Hi,

I wrote Piglet, a Ruby DSL, for exactly this purpose:

http://github.com/iconara/piglet

It makes it possible to reuse blocks of operations, and even define
new operations (that are blocks of other operations), as well as use
looping and other control-of-flow structures. It compiles down to Pig
Latin.

T#

On Wed, Feb 10, 2010 at 6:08 AM, Alan Gates <[email protected]> wrote:
> You are not wrong.  This is a feature we'd like to add but haven't gotten to
> yet.
>
> Alan.
>
> On Feb 9, 2010, at 8:12 PM, prasenjit mukherjee wrote:
>
>> May be I was not clear enough on my problem. I would like to call
>> another pig-script from a pig-script. How can I do that.
>>
>> As far as I understand, you can call a pig script from a unix-shell (
>> or windows ) passing those parameters, but not from another pig-script
>> ? I would be glad to be proved wrong. I wish I am wrong :)
>>
>> On Wed, Feb 10, 2010 at 8:36 AM, zaki rahaman <[email protected]>
>> wrote:
>>>
>>> Hi Prasen,
>>>
>>> If the only thing changing is the input and/or output, you can
>>> parametrize
>>> your script so that you can easily re-use your script with parameter
>>> substitution.
>>>
>>> On Tue, Feb 9, 2010 at 9:49 PM, prasenjit mukherjee <
>>> [email protected]> wrote:
>>>
>>>> Is there a way to reuse a pig scripts ( like def:: in python or
>>>> function calls etc)  from inside a calling pig script. I have a set of
>>>>  basic pig script which I would like to call from a high-level
>>>> pig-script. Currently I have to copy/paste exact same set of code with
>>>> different input relation. This makes the code unnecessary bulky and is
>>>> error prone. Even a macro def will be a great help.
>>>>
>>>> -Thanks,
>>>> Prasen
>>>>
>>>
>>>
>>>
>>> --
>>> Zaki Rahaman
>>>
>
>

Reply via email to