【发布时间】:2018-06-30 04:51:07
【问题描述】:
我在 hdfs 目录 /user/bzhang/filefortable 中有一个 csv 文件:
123,1
我使用以下内容在 hive 中使用 presto 创建一个外部表:
create table hive.testschema.au1 (count bigint, matched bigint) with (format='TEXTFILE', external_location='hdfs://192.168.0.115:9000/user/bzhang/filefortable');
但是当我运行 select * from au1 时,我得到了
presto:testschema> select * from au1;
count | matched
-------+---------
NULL | NULL
我将逗号更改为 TAB 作为分隔符,但它仍然返回 NULL。但是如果我将 csv 修改为
123
只有 1 列,select * from au1 给了我:
presto:testschema> select * from au1;
count | matched
-------+---------
123 | NULL
所以也许我的文件格式或其他什么有问题?
【问题讨论】: