java - Apache Pig process CSV with fields wrapped in quotes -


how can process csv file fields wrapped in quotes?

line process example (field delimiter ',')

i column1, column2, "yes, i'm column3"

the example has 3 columns. following example have 4 columns:

a = load '/path/to/file' using pigstorage(',');

please, suggestions, link resource..?

try loading data, foreach generate regenerate data whatever format need. fields need remove quotes, use replace($3, '\"').

data = load 'testdata' using pigstorage(","); data = foreach data generate     (chararray) $0                col1:chararray,     (chararray) $1                col2:chararray,     (chararray) replace($3, '\"') col3:chararray); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -