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

Switch to Threaded View
Pig, mail # user - [HELP] How to split a string in pig script ?


Copy link to this message
-
[HELP] How to split a string in pig script ?
Leon Town 2012-08-09, 05:37
The input schema is:
*{name:chararray, ids:chararray}*,

and the format of *ids* is like:
id1,id2,id3,...,idn

Now, I want to split *ids* and change the input into the below format:
name   id1
name   id2
...
name   idn
How should I do this by pig script, instead of UDFs.

Thanks!