如何将列注释添加到使用行格式serde'org.apache.hadoop.hive.serde2.OpenCSVSerde'

时间:2017-01-22 23:04:04

标签: hadoop hive hiveql

我正在尝试将列注释添加到使用org.apache.hadoop.hive.serde2.OpenCSVSerde的hive表(cities_v2)。当我触发alter query添加列注释时,它运行正常而没有错误,但列注释仍然是“来自反序列化器”。请帮帮我。

用于更改表以添加注释的查询:

alter table cities_v2  change city_id city_id string COMMENT 'Unique ID from DCM';
alter table cities_v2  change city city string COMMENT 'City name, in English';

创建表查询:

CREATE EXTERNAL TABLE IF NOT EXISTS cities_v2 (
city_id             INT ,
city                STRING
)
PARTITIONED BY (filedate_pst STRING)
row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
with serdeproperties(
"separatorChar" = "\," ,
"quoteChar" = "\"")
LOCATION '/common/data/dfa/cities_v2/'
tblproperties ("skip.header.line.count"="1");

0 个答案:

没有答案