Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Replace at position in string


+
Shin Chan 2012-04-13, 12:17
+
Gianmarco De Francisci Mo... 2012-04-13, 13:23
Copy link to this message
-
Re: Replace at position in string

I'm pretty sure that Java's string handling already has something to do
this, so you could probably call that the same way you'd call a UDF
(assuming there isn't some pig latin to do the job for you). On the
other hand, I think the call for that might be a method in the String
class and don't know if pig has a nice way of calling a data type's
methods. Now I'm curious if such a feature exists.

-Kris

On Fri, Apr 13, 2012 at 02:17:48PM +0200, Shin Chan wrote:
> Hi all,
>
>  How to replace some value in string at particular location
>
>  For example
>
>  abcd
>
>  Replace values from index 0-1 with mn
>
>  mncd as output
>
>  Any built in UDF or i should write own UDF?.
>
>  I checked existing Replace method , it replaces value to some another value.
>
> Thanks and Regards ,

--
Kris Coward http://unripe.melon.org/
GPG Fingerprint: 2BF3 957D 310A FEEC 4733  830E 21A4 05C7 1FEB 12B3
+
Jonathan Coveney 2012-04-13, 16:07
+
jagatsingh@... 2012-04-13, 16:03