我创建了一个带有存储桶的avro表,但我遇到以下错误:
处理语句时出错:FAILED:执行错误,返回代码 1来自org.apache.hadoop.hive.ql.exec.DDLTask。斗柱 uniqueid不是表格列的一部分([]
CREATE TABLE s.TEST_OD_V(
UniqueId int,
dtCd string,
SysSK int,
Ind string)
PARTITIONED BY (vcd STRING)
CLUSTERED BY (UniqueId) INTO 500 BUCKETS
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
TBLPROPERTIES ('avro.schema.url'='s3a:/bucket/schema/pr_v.avsc');
我正在使用hive 1.1。请帮帮我......
答案 0 :(得分:0)
试试这个(可从Hive 0.14获得):
CREATE TABLE s.TEST_OD_V(
UniqueId int,
dtCd string,
SysSK int,
Ind string)
PARTITIONED BY (vcd STRING)
CLUSTERED BY (UniqueId) INTO 500 BUCKETS
STORED AS AVRO;