You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Jerry Lam <ch...@gmail.com> on 2013/06/06 23:47:13 UTC

Processing TSV files using Pig

Hi pig users,

I wonder if anyone has experience in processing TSV files with Pig?
Usually a TSV file contains a header line describing the columns. For
example:

---- sample.tsv ----
first_name    last_name    age
foo               bar              1

I want to use the first line of TSV as the schema with chararray as data
type for all fields.

Is there a loader readily available for this kind of scenario?

Thank you,

Jerry

Re: Processing TSV files using Pig

Posted by Jerry Lam <ch...@gmail.com>.
Hi Johnny,

Thanks for the pointer. I will try it.

Regards,

Jerry


On Thu, Jun 6, 2013 at 5:58 PM, Johnny Zhang <xi...@cloudera.com> wrote:

> Hi, Jerry:
> This seems what you need.
>
> http://mail-archives.apache.org/mod_mbox/pig-user/201301.mbox/%3CCAB-acjMoZNyeTkL+Hm2FVvVwEy7fZrFGUBYpAqtb76vbLWp93Q@mail.gmail.com%3E
>
> Johnny
>
>
> On Thu, Jun 6, 2013 at 2:47 PM, Jerry Lam <ch...@gmail.com> wrote:
>
> > Hi pig users,
> >
> > I wonder if anyone has experience in processing TSV files with Pig?
> > Usually a TSV file contains a header line describing the columns. For
> > example:
> >
> > ---- sample.tsv ----
> > first_name    last_name    age
> > foo               bar              1
> >
> > I want to use the first line of TSV as the schema with chararray as data
> > type for all fields.
> >
> > Is there a loader readily available for this kind of scenario?
> >
> > Thank you,
> >
> > Jerry
> >
>

Re: Processing TSV files using Pig

Posted by Johnny Zhang <xi...@cloudera.com>.
Hi, Jerry:
This seems what you need.
http://mail-archives.apache.org/mod_mbox/pig-user/201301.mbox/%3CCAB-acjMoZNyeTkL+Hm2FVvVwEy7fZrFGUBYpAqtb76vbLWp93Q@mail.gmail.com%3E

Johnny


On Thu, Jun 6, 2013 at 2:47 PM, Jerry Lam <ch...@gmail.com> wrote:

> Hi pig users,
>
> I wonder if anyone has experience in processing TSV files with Pig?
> Usually a TSV file contains a header line describing the columns. For
> example:
>
> ---- sample.tsv ----
> first_name    last_name    age
> foo               bar              1
>
> I want to use the first line of TSV as the schema with chararray as data
> type for all fields.
>
> Is there a loader readily available for this kind of scenario?
>
> Thank you,
>
> Jerry
>