Hive 配置单元中的外部表未显示数据
我在Hive中创建了一个表Hive 配置单元中的外部表未显示数据,hive,Hive,我在Hive中创建了一个表 create external table if not exists firsttest (id int, name char(50), exp char(50)) row format delimited FIELDS TERMINATED BY '/t' stored as textfile location '/user/amit/test1' test1位置上的文件是一个简单的.txt文件,有3行标签分隔,如下所示 1 kiran or
create external table if not exists firsttest
(id int,
name char(50),
exp char(50))
row format delimited FIELDS TERMINATED BY '/t'
stored as textfile
location '/user/amit/test1'
test1位置上的文件是一个简单的.txt文件,有3行标签分隔,如下所示
1 kiran oracle
2 das oracle
3 rahul python
将创建外部表。但是,当我从firsttest中选择*
然后我看到3行都是空数据。
有人能解释为什么吗?为什么我看到所有空值而没有数据
谢谢。
以分隔符结尾的Aks字段必须是
\t
而不是/t
删除现有表并使用正确的分隔符重新创建表,然后尝试从表中选择数据
示例:
@aks,太好了..你能接受解决后关闭此线程的答案吗!
drop table firsttest;
create external table if not exists firsttest
(id int,
name char(50),
exp char(50))
row format delimited FIELDS TERMINATED BY '\t'
stored as textfile;