我正在尝试使用以下查询创建配置单元表 CREATE EXTERNAL TABLE IF NOT EXISTS test_table PARTITIONED BY(loaded_stage_date BIGInt) 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' location 'hdfs:///dev/data/warehouse/clean//source/tao/bdo/test_table' TBLPROPERTIES ('avro.schema.url'='hdfs:///dev/data/warehouse/clean//source/tao/dbo/test_table/.metadata/test_table.avsc');
表架构如下:
{
"type":"record",
"name":"test",
"namespace":"com.abc.def.jhon",
"doc":"test",
"fields": [{
"name":"ID",
"type":"string"
} ,{
"name":"LOGIN_ID",
"type":"string"
} ,{
"name":"ENAME",
"type":"string"
} ,{
"name":"STATE",
"type":"string"
} ,{
"name":"LOCAL_START_TIME",
"type":"long"
} ,{
"name":"LOCAL_STOP_TIME",
"type":"long"
} ,{
"name":"UTC_START_TIME",
"type":"long"
} ,{
"name":"UTC_STOP_TIME",
"type":"long"
} ,{
"name":"NDX",
"type":"long"
} ,{
"name":"STATE_INDX",
"type":"float"
} ,{
"name":"GUID",
"type":"string"
} ,{
"name":"DURATION_SECONDS",
"type":"bigint"
}]
}
我得到以下错误:
error_error_error_error_error_error_error string from deserializer
cannot_determine_schema string from deserializer
check string from deserializer
schema string from deserializer
url string from deserializer
and string from deserializer
literal string from deserializer
loaded_stage_date bigint
但是,当我在avsc(schema file)文件中将列类型指定为int而不是bigint时,它运行良好。
暂无答案!
目前还没有任何答案,快来回答吧!