Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> working with data with varying column length


Copy link to this message
-
RE: working with data with varying column length
This feature does not appear to be available for 0.8.1. Is this correct?
________________________________________
From: Prashant Kommireddi [[EMAIL PROTECTED]]
Sent: Wednesday, February 22, 2012 3:55 PM
To: [EMAIL PROTECTED]
Subject: Re: working with data with varying column length

Take a look at Project-Range Expressions on this page
http://pig.apache.org/docs/r0.9.1/basic.html

This should do it.

A = load 'input'; --File containing data
B = foreach A generate $2 .. ;

Thanks,
Prashant

On Wed, Feb 22, 2012 at 3:45 PM, Chan, Tim <[EMAIL PROTECTED]> wrote:

> I would like to remove the first two columns of data from data with
> varying column lengths.
>
> For example:
>
> row1: $0 $1 $2 $3 $4
> row2: $0 $1 $2
> row3: $0 $1 $2 $3 $4 $5
>
>
> I would like to get rid of $0 and $1 from all the rows.
>
>
>