You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Lai Will <la...@student.ethz.ch> on 2011/04/18 11:28:19 UTC
define constants in pig script
Hi there,
I have a pig script and that has hardcoded some input/output file paths as well as some parameters.
It's relatively tedious to change these...
Is there a way to define constants at the beginning of the script so I have the configuration in one place?
Best,
Will
RE: define constants in pig script
Posted by Lai Will <la...@student.ethz.ch>.
Thanks! That was exactly what I was looking for :)
Best,
Will
-----Original Message-----
From: Dmitriy Ryaboy [mailto:dvryaboy@gmail.com]
Sent: Montag, 18. April 2011 11:52
To: user@pig.apache.org
Subject: Re: define constants in pig script
You are looking for %DEFAULT:
http://pig.apache.org/docs/r0.8.0/piglatin_ref2.html#Parameter+Substitution
On Mon, Apr 18, 2011 at 2:28 AM, Lai Will <la...@student.ethz.ch> wrote:
> Hi there,
>
> I have a pig script and that has hardcoded some input/output file
> paths as well as some parameters.
> It's relatively tedious to change these...
>
> Is there a way to define constants at the beginning of the script so I
> have the configuration in one place?
>
> Best,
> Will
>
Re: define constants in pig script
Posted by Dmitriy Ryaboy <dv...@gmail.com>.
You are looking for %DEFAULT:
http://pig.apache.org/docs/r0.8.0/piglatin_ref2.html#Parameter+Substitution
On Mon, Apr 18, 2011 at 2:28 AM, Lai Will <la...@student.ethz.ch> wrote:
> Hi there,
>
> I have a pig script and that has hardcoded some input/output file paths as
> well as some parameters.
> It's relatively tedious to change these...
>
> Is there a way to define constants at the beginning of the script so I have
> the configuration in one place?
>
> Best,
> Will
>