You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by data scientist <da...@gmail.com> on 2016/01/19 07:48:53 UTC
reading CSV file with commas in fields
Hello
I am new to pig. My pig version is 0.11.0-cdh4.7.0. I have uploaded a CSV
file
to HDFS using Sqoop. File data kind of looks as follows.
1 , "foo, foo", 14, "temp"
So second field has a comma embedded it. How do I tell PigStorage function
to read this.
Thanks
9026
Re: reading CSV file with commas in fields
Posted by Arvind S <ar...@gmail.com>.
try using excelcsv storage from piggybank ..
the ref below is for pig 12 but i think you can find one for pig 11 also.
http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.pig/piggybank/0.12.0-cdh5.2.1/org/apache/pig/piggybank/storage/CSVExcelStorage.java
*Cheers !!*
Arvind
On Tue, Jan 19, 2016 at 12:18 PM, data scientist <
datascientist9026@gmail.com> wrote:
> Hello
>
> I am new to pig. My pig version is 0.11.0-cdh4.7.0. I have uploaded a CSV
> file
> to HDFS using Sqoop. File data kind of looks as follows.
>
> 1 , "foo, foo", 14, "temp"
>
> So second field has a comma embedded it. How do I tell PigStorage function
> to read this.
>
> Thanks
> 9026
>