Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

Pig: A problem with multiple delimiters. Please help!!

$
0
0

I’m new to to Pig. I have a problem –

My input textfile.txt ->

aaaa,bbbb,cccc
aaaa,’xxxx,yyyy’,zzzz
qqqq,wwww,eeee

Output should have three columns only. Anything in single quotes should be treated as single column. ‘xxxx,yyyy’ to be treated as one field data only.

If I use below –
A = load textfile.txt PigStorage(,) as (col1:chararray, col2:chararray)
I get –
(aaaa,bbbb,cccc)
(aaaa,’xxxx,yyyy’)
(qqqq,wwww,eeee)

Please help me with this.


Viewing all articles
Browse latest Browse all 3435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>