You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Yang <te...@gmail.com> on 2012/06/28 21:48:23 UTC

PigStorage problem for nested structures?

if I have a field that contains ",", and I add it to a tuple,

then  then tuple becomes part of a row  in a relation.

I STORE the relation using PigStorage.
so each row is a nested tuple.

then the "," in the content can not be distinguished from the separator
used by pigStorage.

what is the easiest way out of this?
(preprocessing to escape "," ? another more powerful storage format? )

thanks
Yang

Re: PigStorage problem for nested structures?

Posted by Jonathan Coveney <jc...@gmail.com>.
The answer here is to use a more powerful storage format, which is a good
habit to get into with complicated structures.

2012/6/28 Yang <te...@gmail.com>

> if I have a field that contains ",", and I add it to a tuple,
>
> then  then tuple becomes part of a row  in a relation.
>
> I STORE the relation using PigStorage.
> so each row is a nested tuple.
>
> then the "," in the content can not be distinguished from the separator
> used by pigStorage.
>
> what is the easiest way out of this?
> (preprocessing to escape "," ? another more powerful storage format? )
>
> thanks
> Yang
>