You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Dmitriy Lyubimov <dl...@gmail.com> on 2011/01/22 01:50:27 UTC
Long arguments to loader functions
Hi,
i'd be grateful if you could help me with this little but quite annoying
detail
When i pass specifications to loadFunc, the string argument in case of wide
input specifications can become quite long
and i would like to break and carry the quoted string argument over on to
the next line. (Pig 0.7.0 ). Sometimes it's as long 7-8 screens (
and that's on a wide monitor already).
i tried regular java syntax like 'A'+'B" as well as standard CONCAT
function, none parses.
E.g. trying using concat with a custom load func
INCREMENTAL = load '$input' using
com.inadco.ecoadapters.pig.HBaseProtobufLoader(
CONCAT('<long-long-input-spec>', 'long-long-input-spec2'));
causes a parsing error
Error during parsing. Encountered " <IDENTIFIER> "CONCAT "" at line 15,
column 57.
Was expecting one of:
<QUOTEDSTRING> ...
")" ...
it looks like 'using loadFunc()' syntax doesn't even consider use of
expressions for its arguments.
Any workaround for this?
Thank you.
-Dmitriy
Re: Long arguments to loader functions
Posted by Dmitriy Ryaboy <dv...@gmail.com>.
the first version of the patch worked on 0.8
On Fri, Jan 21, 2011 at 5:06 PM, Dmitriy Lyubimov <dl...@gmail.com> wrote:
> Ok, so it's for 0.9 then? ok thanks.
>
> On Fri, Jan 21, 2011 at 5:04 PM, Dmitriy Ryaboy <dv...@gmail.com>
> wrote:
>
> > There's a patch for this on the Jira I believe.
> > https://issues.apache.org/jira/browse/PIG-1749
> >
> > On Fri, Jan 21, 2011 at 4:50 PM, Dmitriy Lyubimov <dl...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > i'd be grateful if you could help me with this little but quite
> annoying
> > > detail
> > >
> > > When i pass specifications to loadFunc, the string argument in case of
> > wide
> > > input specifications can become quite long
> > > and i would like to break and carry the quoted string argument over on
> to
> > > the next line. (Pig 0.7.0 ). Sometimes it's as long 7-8 screens (
> > > and that's on a wide monitor already).
> > >
> > > i tried regular java syntax like 'A'+'B" as well as standard CONCAT
> > > function, none parses.
> > > E.g. trying using concat with a custom load func
> > >
> > > INCREMENTAL = load '$input' using
> > > com.inadco.ecoadapters.pig.HBaseProtobufLoader(
> > > CONCAT('<long-long-input-spec>', 'long-long-input-spec2'));
> > >
> > > causes a parsing error
> > >
> > > Error during parsing. Encountered " <IDENTIFIER> "CONCAT "" at line 15,
> > > column 57.
> > > Was expecting one of:
> > > <QUOTEDSTRING> ...
> > > ")" ...
> > >
> > >
> > > it looks like 'using loadFunc()' syntax doesn't even consider use of
> > > expressions for its arguments.
> > >
> > > Any workaround for this?
> > >
> > > Thank you.
> > > -Dmitriy
> > >
> >
>
Re: Long arguments to loader functions
Posted by Dmitriy Lyubimov <dl...@gmail.com>.
Ok, so it's for 0.9 then? ok thanks.
On Fri, Jan 21, 2011 at 5:04 PM, Dmitriy Ryaboy <dv...@gmail.com> wrote:
> There's a patch for this on the Jira I believe.
> https://issues.apache.org/jira/browse/PIG-1749
>
> On Fri, Jan 21, 2011 at 4:50 PM, Dmitriy Lyubimov <dl...@gmail.com>
> wrote:
>
> > Hi,
> >
> > i'd be grateful if you could help me with this little but quite annoying
> > detail
> >
> > When i pass specifications to loadFunc, the string argument in case of
> wide
> > input specifications can become quite long
> > and i would like to break and carry the quoted string argument over on to
> > the next line. (Pig 0.7.0 ). Sometimes it's as long 7-8 screens (
> > and that's on a wide monitor already).
> >
> > i tried regular java syntax like 'A'+'B" as well as standard CONCAT
> > function, none parses.
> > E.g. trying using concat with a custom load func
> >
> > INCREMENTAL = load '$input' using
> > com.inadco.ecoadapters.pig.HBaseProtobufLoader(
> > CONCAT('<long-long-input-spec>', 'long-long-input-spec2'));
> >
> > causes a parsing error
> >
> > Error during parsing. Encountered " <IDENTIFIER> "CONCAT "" at line 15,
> > column 57.
> > Was expecting one of:
> > <QUOTEDSTRING> ...
> > ")" ...
> >
> >
> > it looks like 'using loadFunc()' syntax doesn't even consider use of
> > expressions for its arguments.
> >
> > Any workaround for this?
> >
> > Thank you.
> > -Dmitriy
> >
>
Re: Long arguments to loader functions
Posted by Dmitriy Ryaboy <dv...@gmail.com>.
There's a patch for this on the Jira I believe.
https://issues.apache.org/jira/browse/PIG-1749
On Fri, Jan 21, 2011 at 4:50 PM, Dmitriy Lyubimov <dl...@gmail.com> wrote:
> Hi,
>
> i'd be grateful if you could help me with this little but quite annoying
> detail
>
> When i pass specifications to loadFunc, the string argument in case of wide
> input specifications can become quite long
> and i would like to break and carry the quoted string argument over on to
> the next line. (Pig 0.7.0 ). Sometimes it's as long 7-8 screens (
> and that's on a wide monitor already).
>
> i tried regular java syntax like 'A'+'B" as well as standard CONCAT
> function, none parses.
> E.g. trying using concat with a custom load func
>
> INCREMENTAL = load '$input' using
> com.inadco.ecoadapters.pig.HBaseProtobufLoader(
> CONCAT('<long-long-input-spec>', 'long-long-input-spec2'));
>
> causes a parsing error
>
> Error during parsing. Encountered " <IDENTIFIER> "CONCAT "" at line 15,
> column 57.
> Was expecting one of:
> <QUOTEDSTRING> ...
> ")" ...
>
>
> it looks like 'using loadFunc()' syntax doesn't even consider use of
> expressions for its arguments.
>
> Any workaround for this?
>
> Thank you.
> -Dmitriy
>