我正在使用Drill的CTAS函数来创建输出的json文件。我收到以下错误。
org.apache.drill.common.exceptions.UserRemoteException:SYSTEM ERROR:UnsupportedOperationException:工作空间'hivetest1.hive'中的不支持格式'null'[错误ID:3e74fde2-b2e5-4799-a4f9-0236d003ab31 on centos6.qubida。 IO:31010]
如果我在defaultInputFormat中也使用json,则会发生同样的错误。 工作区中的格式'json'不受支持。我试图删除defaultInputFormat本身。但无法创建工作区。
我的存储
{
"type": "file",
"enabled": true,
"connection": "file:///",
"config": null,
"workspaces": {
"hive": {
"location": "/tmp/",
"writable": true,
"defaultInputFormat": null
}
},
"formats": {
"json": {
"type": "json",
"extensions": [
"json"
]
}
}
我甚至尝试过使用不同的defaultInputFormat。我已将store.format也设置为JSON。我已将store.mongo.all_text_mode更改为true.store.json.all_text_mode也是如此。但是,我仍然遇到同样的错误。需要改变什么。我正在使用1.6钻。我的CTAS查询是
create table hivetest1.hive.`output_json` as select distinct buildingid, country, temprange from hive.`sensorfiles`.`hvac_building` where extremetemp = '1'
我可以单独查看搜索查询的输出。任何想法?
答案 0 :(得分:1)
我试图复制你的问题。但它正在发挥作用。
我所做的就是:
alter session set `store.format`='json';
create table hivetest1.hive.`output.json` as SELECT * FROM cp.`employee.json` LIMIT 20;
一切都很好。