hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: Can hive strip '#' comments in input data?
Date Mon, 04 Apr 2011 16:21:51 GMT
2011/4/4 Bjørn Remseth <la3lma@gmail.com>:
> Hi guys.
>
> I've got some input data with comment lines starting with '#' and lasting to
> the end of line, like:
>      #this is a comment ....
> Is there a way to make hive ignore these comments when importing data
> into a table?
>
> --
>
>                                                  (Rmz)
>

You can create your own InputFormat or Serde. An easy way:

create table source(string row);
Load your data into source
create table destination as select row from source where substring(row,1)!='#';

Mime
View raw message