That's what I'm doing as of now. I was looking for some way to run an
iterative loop over the REPLACE.

Thanks.
On Mar 5, 2016 15:25, "Artem Ervits" <artemerv...@gmail.com> wrote:

> You need to call replace on every field.
> On Mar 5, 2016 4:01 PM, "Parth Sawant" <parth.sawan...@gmail.com> wrote:
>
> > Hi
> > I'm trying to run Pig's REPLACE UDF over all the fields in every tuple
> in a
> > Pig relation.
> > The REPLACE UDF does not however work with the * operator to run itself
> > over the contents of each field in a tuple.
> > For eg:
> >
> > SRC= LOAD 'input' using PigStorage('\\u001') as
> > (col1:chararray,col2:chararray,col3:chararray,col4:chararray);
> >
> > REP=FOREACH SRC GENERATE REPLACE(col1,'str1','str2');
> >
> > I want to iterate this same replace function over all the columns in a
> > tuple.
> >
> > Any help appreciated.
> >
> > Thanks
> > Parth S
> >
>

Reply via email to