我是 Hive 的新手,任何人都可以帮助我解决我在尝试创建下表时收到的以下错误:
hive> create table Employees(
> name String,
> salary float,
> subordinates array<string>,
> deductions map<string,float>,
> address struct<street:string,city:string,state:string>)
> row format serde
> 'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe' << **this one is present in "hive-contrib"**
> with serdeproperties ("field.delim"=",")
> location 'Mytable/employee'; **<< This is in my HDFS location.**
错误是:
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: hdfs://localhost:9000./Mytable/employee)**
我的数据采用以下形式:
JSON :
{
"name":"Manager",
"salary":10000.0,
"subordinates": ["Emp1", "Emp2"],
"deductions":{
"State Tax":0.1,
"Insurance":2,
},
"address":{
"street":"1 Ave",
"city":"Chicago",
"state":"IL"
}
}
提前致谢。