show create table tmp.da_shop_live_hot_js_feature
CREATE TABLE `tmp.da_shop_live_hot_js_feature`(
`shop_id` bigint COMMENT 'from deserializer',
`test_01` bigint COMMENT 'from deserializer',
`test_02` bigint COMMENT 'from deserializer')
PARTITIONED BY (
`dt` string)
ROW FORMAT SERDE
'org.apache.hive.hcatalog.data.JsonSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
去设置:表结构上的:ROW FORMAT SERDE
set hive.serdes.using.metastore.for.schema=org.apache.hive.hcatalog.data.JsonSerDe;
show create table tmp.da_shop_live_hot_js_feature;
CREATE TABLE `tmp.da_shop_live_hot_js_feature`(
`shop_id` bigint COMMENT '商家id',
`test_01` bigint COMMENT '测试字段',
`test_02` bigint COMMENT '测试字段')
PARTITIONED BY (
`dt` string)
ROW FORMAT SERDE
'org.apache.hive.hcatalog.data.JsonSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
然后就OK了
alter table tmp.da_shop_live_hot_js_feature add columns(
test_03 bigint comment '测试字段'
)
;
在设置回来
set hive.serdes.using.metastore.for.schema=org.apache.hadoop.hive.ql.io.orc.OrcSerde;