You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by sumit ghosh <su...@yahoo.com> on 2011/04/20 06:48:47 UTC
Splitting a String
Hi,
I am trying to split a string using piggybank - split function:
DEFINE StrSplit org.apache.pig.piggybank.evaluation.string.Split();
A = Load 'Sample' using Pigstorage(' ');
B = ForEach A generate $4 as URL, StrSplit($10, 'N' ) as Browser;
DUMP B;
I do not get any tuple as the output for the Browser field. What is that I am
doing wrong?
Thanks,
Sumit.
Re: Splitting a String
Posted by sumit ghosh <su...@yahoo.com>.
Got it!
StrSplit((chararray)$10, 'N' )
________________________________
From: sumit ghosh <su...@yahoo.com>
To: user@pig.apache.org
Sent: Wed, 20 April, 2011 10:18:47 AM
Subject: Splitting a String
Hi,
I am trying to split a string using piggybank - split function:
DEFINE StrSplit org.apache.pig.piggybank.evaluation.string.Split();
A = Load 'Sample' using Pigstorage(' ');
B = ForEach A generate $4 as URL, StrSplit($10, 'N' ) as Browser;
DUMP B;
I do not get any tuple as the output for the Browser field. What is that I am
doing wrong?
Thanks,
Sumit.