You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Mix Nin <pi...@gmail.com> on 2013/03/14 01:10:02 UTC

Ignore first record of a file

I have a file as follows:


event_time        session_id
12334545          67890087
 56788898         87689000


I do not want to read the first record of file which consists of  column
names.

How to write a PIG script for this


Thanks

Re: Ignore first record of a file

Posted by Norbert Burger <no...@gmail.com>.
Perhaps the general way to do this is to write a custom loader, but for
this simpler usecase, can you just filter out the record?

FILTER ... BY $0 MATCHES '^[0-9]+'

Norbert

On Wed, Mar 13, 2013 at 8:10 PM, Mix Nin <pi...@gmail.com> wrote:

> I have a file as follows:
>
>
> event_time        session_id
> 12334545          67890087
>  56788898         87689000
>
>
> I do not want to read the first record of file which consists of  column
> names.
>
> How to write a PIG script for this
>
>
> Thanks
>