You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Bradford Stephens <br...@gmail.com> on 2011/09/27 01:58:18 UTC

Re: Skip first line of CSV loading

Any thoughts on this?

On Wed, Apr 13, 2011 at 1:55 PM, Daniel Jue <te...@gmail.com> wrote:
> Is there a way to have hive skip the first line of CSV loading (say,
> to skip column headers)?
>
> Or will this require a second stage with a transform, and
> a) a hard coded knowledge of what a header row might contain, or
> b) a sequence number column for skipping?
>
>
> Seems like this should be a pretty common need.
>



-- 
Bradford Stephens,
CEO and Founder, Drawn to Scale
http://drawntoscale.com
(530) 763-DATA

http://www.drawntoscale.com -- Spire, the "Heroku for Big Data"

Re: Skip first line of CSV loading

Posted by Adriaan Tijsseling <ad...@tijsseling.com>.
You could try to remove the first line of a file before passing it on to hive. Something like `sed -i '1d' filename`. 

Adriaan

On 2011/09/27, at 01:58, Bradford Stephens wrote:

> Any thoughts on this?
> 
> On Wed, Apr 13, 2011 at 1:55 PM, Daniel Jue <te...@gmail.com> wrote:
>> Is there a way to have hive skip the first line of CSV loading (say,
>> to skip column headers)?
>> 
>> Or will this require a second stage with a transform, and
>> a) a hard coded knowledge of what a header row might contain, or
>> b) a sequence number column for skipping?
>> 
>> 
>> Seems like this should be a pretty common need.