hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Jain <ankitjainc...@gmail.com>
Subject Re: Accessing individual columns from a Hive table which is row delimited by RegexSerde
Date Fri, 09 Sep 2011 09:25:26 GMT
can you provide me sample log data

Thanks,
Ankit

On Fri, Sep 9, 2011 at 2:33 AM, MIS <misapache@gmail.com> wrote:

> I want to access individual columns from a table created with row delimited
> by RegexSerde.
>
> For example,
> I have created a table as below:
>
> create table test ( col1 STRING, col2 STRING )
>   ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
>   WITH SERDEPROPERTIES ("input.regex" = "([^ ]*) ([^ ]*)", "output.format.string" = "%$1s
%$2s");
>
> After loading valid data,
> *select * from test* workd fine,
>
> however *select col1 from test* or *select col2 from test* or *select
> col1, col2 from test* fail.
>
> how do I achieve the above.
>
> Thanks,
> MIS.
>

Mime
View raw message