You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Wei Yao <ya...@papayamobile.com> on 2012/01/04 10:54:45 UTC

Hive alter table SerDe doesn't work in hive CDH3 for me

Hi all: hive alter serde seems doesn't work in CDH3u2 Hadoop and CDH3 Hive
1. create table with wrong regex:
CREATE TABLE sample1(key string, value string) row format serde
'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
with serdeproperties (“input.regex”=”[\\w] is [\\w]”)

2. import data
file like:
sky is blue
sea is blue

LOAD data local inpath ‘/path/to/file’ into table sample1

3. check, yes, wrong regex doesn't work
select * from sample1
NULL NULL
NULL NULL

4. try alter Serde (alter serde also doesn't work)
alter table sample1 set serdeproperties (“input.regex”=”[\\w]+ is [\\w]+”)

5. still doesn't work, but create new table with corrent regex works for me.
select * from sample1
still shows
NULL NULL
NULL NULL

Thanks for any supporting.

-- 

Wei Yao
Engineer of PapayaMobile inc.
yaowei@papayamobile.com
+86-13811797327