Hi dujinhang,
See, http://wiki.apache.org/hadoop/Hive/UserGuide
add jar ../build/contrib/hive_contrib.jar;
CREATE TABLE apachelog (
host STRING,
identity STRING,
user STRING,
time STRING,
request STRING,
status STRING,
size STRING,
referer STRING,
agent STRING)
ROW FORMAT SERDE
How does the columns in the table match the "input.regex" ?
In other words, which part of the regex matches the columns of the table?
Will anybody offer some help?
2011/5/30 YUYANG LAN
> hi, how about this ?
>
> (.+)&&&(.+?)(?:\^\^.*)?
>
> On Mon, May 30, 2011 at 6:07 PM, jinhang du wrote:
hi, how about this ?
(.+)&&&(.+?)(?:\^\^.*)?
On Mon, May 30, 2011 at 6:07 PM, jinhang du wrote:
> My data format is as follows:
> a&&&b
> c&&&b^^xyz
> c&&&d^^hdo
> create table f(str1 string, str2 string) ROW FORMAT SERDE
> 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
> With SERDEPROPERTIE
quot;
>
>
>
> *
> *
>
>
> -- Original --
> *From: * "jinhang du";
> *Date: * Mon, May 30, 2011 05:07 PM
> *To: * "user";
> *Subject: * Question about create hive tables.
>
> My data form
My data format is as follows:
a&&&b
c&&&b^^xyz
c&&&d^^hdo
create table f(str1 string, str2 string) ROW FORMAT SERDE
'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
With SERDEPROPERTIES (
"input.regex"="(.+)&&&(.+)(\^\^.+)?"
)
My aim is :
a b
c b
c d
However ,
a b
c b^^xyz
c d^^hdo
So how to