You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by soniya B <so...@gmail.com> on 2013/04/26 19:04:45 UTC
BinCond is not working
Hi Friends,
I have registered piggy bank.I tried to to use BinCond funcation but it is
not working . Any one can suggest why it not working?
Re: BinCond is not working
Posted by soniya B <so...@gmail.com>.
Hi Russell,
I have already executed below one but no luck
register piggybank.jar
*define BinCond org.apache.pig.piggybank.evaluation.decode.BinCond();*
I am getting syntax error as mismatched input '(' expecting SEMI_COLON
On Sat, Apr 27, 2013 at 12:44 AM, Russell Jurney
<ru...@gmail.com>wrote:
> Did you do this first?
>
> register piggybank.jar
> *define BinCond org.apache.pig.piggybank.evaluation.decode.BinCond();*
>
> Russell Jurney http://datasyndrome.com
>
> On Apr 26, 2013, at 11:43 AM, soniya B <so...@gmail.com> wrote:
>
> Hi Russell,
>
> Actually i am trying to convert sql queries to PIG script.
>
>
> SELECT SUP1,DEP_NO,
>
> CASE WHEN SVT1= 'Y' THEN 'A'
>
> WHEN SVT2= 'Y' THEN 'B'
> WHEN SVT3 = 'Y' THEN 'C'
> WHEN SVT4= 'I' THEN 'D'
> WHEN SVT5 = 'J' THEN 'E' ELSE 'F' END FROM PEP_ACC_Details
>
> I am trying to convert above statement into PIG script and i have written
> script below
>
> A = Load 'PEP_ACC_Details' ;
>
> B= foreach A generate
>
> SUP1,DEP_NO,BinCond(SVT1,'Y','A',SVT2,'Y','B',SVT3,'Y','C',SVT4,'I','D',SVT5,'J','E','F');
>
> but it is not working. Could you please verify and let me know..
>
> Yours
>
> Soniya
>
>
> On Fri, Apr 26, 2013 at 11:02 PM, Russell Jurney
> <ru...@gmail.com>wrote:
>
> Paste code?
>
> On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com> wrote:
>
>
> Hi Friends,
>
>
> I have registered piggy bank.I tried to to use BinCond funcation but it
>
> is
>
> not working . Any one can suggest why it not working?
>
Re: BinCond is not working
Posted by Russell Jurney <ru...@gmail.com>.
Did you do this first?
register piggybank.jar
*define BinCond org.apache.pig.piggybank.evaluation.decode.BinCond();*
Russell Jurney http://datasyndrome.com
On Apr 26, 2013, at 11:43 AM, soniya B <so...@gmail.com> wrote:
Hi Russell,
Actually i am trying to convert sql queries to PIG script.
SELECT SUP1,DEP_NO,
CASE WHEN SVT1= 'Y' THEN 'A'
WHEN SVT2= 'Y' THEN 'B'
WHEN SVT3 = 'Y' THEN 'C'
WHEN SVT4= 'I' THEN 'D'
WHEN SVT5 = 'J' THEN 'E' ELSE 'F' END FROM PEP_ACC_Details
I am trying to convert above statement into PIG script and i have written
script below
A = Load 'PEP_ACC_Details' ;
B= foreach A generate
SUP1,DEP_NO,BinCond(SVT1,'Y','A',SVT2,'Y','B',SVT3,'Y','C',SVT4,'I','D',SVT5,'J','E','F');
but it is not working. Could you please verify and let me know..
Yours
Soniya
On Fri, Apr 26, 2013 at 11:02 PM, Russell Jurney
<ru...@gmail.com>wrote:
Paste code?
On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com> wrote:
Hi Friends,
I have registered piggy bank.I tried to to use BinCond funcation but it
is
not working . Any one can suggest why it not working?
Re: BinCond is not working
Posted by Miguel Angel Martin junquera <mi...@gmail.com>.
register /path_to_yourjars/piggybank.jar*;*
define BinCond org.apache.pig.piggybank.evaluation.decode.BinCond();
2013/4/27 soniya B <so...@gmail.com>
> Hi Russell,
>
> I have already executed below one but no luck
>
> register piggybank.jar
> *define BinCond org.apache.pig.piggybank.evaluation.decode.BinCond();*
>
> I am getting syntax error as mismatched input '(' expecting SEMI_COLON
>
> Is the syntax correct that i have written?
>
> Thanks
> Soniya
>
>
> On Sat, Apr 27, 2013 at 12:40 AM, Russell Jurney
> <ru...@gmail.com>wrote:
>
> > What is the error?
> >
> > Russell Jurney http://datasyndrome.com
> >
> > On Apr 26, 2013, at 11:43 AM, soniya B <so...@gmail.com> wrote:
> >
> > > Hi Russell,
> > >
> > > Actually i am trying to convert sql queries to PIG script.
> > >
> > >
> > > SELECT SUP1,DEP_NO,
> > >
> > > CASE WHEN SVT1= 'Y' THEN 'A'
> > >
> > > WHEN SVT2= 'Y' THEN 'B'
> > > WHEN SVT3 = 'Y' THEN 'C'
> > > WHEN SVT4= 'I' THEN 'D'
> > > WHEN SVT5 = 'J' THEN 'E' ELSE 'F' END FROM PEP_ACC_Details
> > >
> > > I am trying to convert above statement into PIG script and i have
> written
> > > script below
> > >
> > > A = Load 'PEP_ACC_Details' ;
> > >
> > > B= foreach A generate
> > >
> >
> SUP1,DEP_NO,BinCond(SVT1,'Y','A',SVT2,'Y','B',SVT3,'Y','C',SVT4,'I','D',SVT5,'J','E','F');
> > >
> > > but it is not working. Could you please verify and let me know..
> > >
> > > Yours
> > >
> > > Soniya
> > >
> > >
> > > On Fri, Apr 26, 2013 at 11:02 PM, Russell Jurney
> > > <ru...@gmail.com>wrote:
> > >
> > >> Paste code?
> > >> On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com>
> wrote:
> > >>
> > >>> Hi Friends,
> > >>>
> > >>> I have registered piggy bank.I tried to to use BinCond funcation but
> it
> > >> is
> > >>> not working . Any one can suggest why it not working?
> > >>>
> > >>
> >
>
Re: BinCond is not working
Posted by soniya B <so...@gmail.com>.
Hi Russell,
I have already executed below one but no luck
register piggybank.jar
*define BinCond org.apache.pig.piggybank.evaluation.decode.BinCond();*
I am getting syntax error as mismatched input '(' expecting SEMI_COLON
Is the syntax correct that i have written?
Thanks
Soniya
On Sat, Apr 27, 2013 at 12:40 AM, Russell Jurney
<ru...@gmail.com>wrote:
> What is the error?
>
> Russell Jurney http://datasyndrome.com
>
> On Apr 26, 2013, at 11:43 AM, soniya B <so...@gmail.com> wrote:
>
> > Hi Russell,
> >
> > Actually i am trying to convert sql queries to PIG script.
> >
> >
> > SELECT SUP1,DEP_NO,
> >
> > CASE WHEN SVT1= 'Y' THEN 'A'
> >
> > WHEN SVT2= 'Y' THEN 'B'
> > WHEN SVT3 = 'Y' THEN 'C'
> > WHEN SVT4= 'I' THEN 'D'
> > WHEN SVT5 = 'J' THEN 'E' ELSE 'F' END FROM PEP_ACC_Details
> >
> > I am trying to convert above statement into PIG script and i have written
> > script below
> >
> > A = Load 'PEP_ACC_Details' ;
> >
> > B= foreach A generate
> >
> SUP1,DEP_NO,BinCond(SVT1,'Y','A',SVT2,'Y','B',SVT3,'Y','C',SVT4,'I','D',SVT5,'J','E','F');
> >
> > but it is not working. Could you please verify and let me know..
> >
> > Yours
> >
> > Soniya
> >
> >
> > On Fri, Apr 26, 2013 at 11:02 PM, Russell Jurney
> > <ru...@gmail.com>wrote:
> >
> >> Paste code?
> >> On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com> wrote:
> >>
> >>> Hi Friends,
> >>>
> >>> I have registered piggy bank.I tried to to use BinCond funcation but it
> >> is
> >>> not working . Any one can suggest why it not working?
> >>>
> >>
>
Re: BinCond is not working
Posted by Russell Jurney <ru...@gmail.com>.
What is the error?
Russell Jurney http://datasyndrome.com
On Apr 26, 2013, at 11:43 AM, soniya B <so...@gmail.com> wrote:
> Hi Russell,
>
> Actually i am trying to convert sql queries to PIG script.
>
>
> SELECT SUP1,DEP_NO,
>
> CASE WHEN SVT1= 'Y' THEN 'A'
>
> WHEN SVT2= 'Y' THEN 'B'
> WHEN SVT3 = 'Y' THEN 'C'
> WHEN SVT4= 'I' THEN 'D'
> WHEN SVT5 = 'J' THEN 'E' ELSE 'F' END FROM PEP_ACC_Details
>
> I am trying to convert above statement into PIG script and i have written
> script below
>
> A = Load 'PEP_ACC_Details' ;
>
> B= foreach A generate
> SUP1,DEP_NO,BinCond(SVT1,'Y','A',SVT2,'Y','B',SVT3,'Y','C',SVT4,'I','D',SVT5,'J','E','F');
>
> but it is not working. Could you please verify and let me know..
>
> Yours
>
> Soniya
>
>
> On Fri, Apr 26, 2013 at 11:02 PM, Russell Jurney
> <ru...@gmail.com>wrote:
>
>> Paste code?
>> On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com> wrote:
>>
>>> Hi Friends,
>>>
>>> I have registered piggy bank.I tried to to use BinCond funcation but it
>> is
>>> not working . Any one can suggest why it not working?
>>>
>>
Re: BinCond is not working
Posted by soniya B <so...@gmail.com>.
Hi Russell,
Actually i am trying to convert sql queries to PIG script.
SELECT SUP1,DEP_NO,
CASE WHEN SVT1= 'Y' THEN 'A'
WHEN SVT2= 'Y' THEN 'B'
WHEN SVT3 = 'Y' THEN 'C'
WHEN SVT4= 'I' THEN 'D'
WHEN SVT5 = 'J' THEN 'E' ELSE 'F' END FROM PEP_ACC_Details
I am trying to convert above statement into PIG script and i have written
script below
A = Load 'PEP_ACC_Details' ;
B= foreach A generate
SUP1,DEP_NO,BinCond(SVT1,'Y','A',SVT2,'Y','B',SVT3,'Y','C',SVT4,'I','D',SVT5,'J','E','F');
but it is not working. Could you please verify and let me know..
Yours
Soniya
On Fri, Apr 26, 2013 at 11:02 PM, Russell Jurney
<ru...@gmail.com>wrote:
> Paste code?
> On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com> wrote:
>
> > Hi Friends,
> >
> > I have registered piggy bank.I tried to to use BinCond funcation but it
> is
> > not working . Any one can suggest why it not working?
> >
>
Re: BinCond is not working
Posted by Russell Jurney <ru...@gmail.com>.
Paste code?
On Apr 26, 2013 10:05 AM, "soniya B" <so...@gmail.com> wrote:
> Hi Friends,
>
> I have registered piggy bank.I tried to to use BinCond funcation but it is
> not working . Any one can suggest why it not working?
>