Hive 正在将空值加载到配置单元表

Hive 正在将空值加载到配置单元表,hive,Hive,我有一个.txt文件,其中包含以下行: Steve,1 1 1 1 1 5 10 20 10 10 10 10 当我创建一个外部表,加载数据并选择*,我得到了空值。请帮助如何显示数值而不是空值。我非常感谢你的帮助 create external table Teller(Name string, Bill array<int>) row format delimited fields terminated by ',' collection items terminated by

我有一个.txt文件,其中包含以下行:

Steve,1 1 1 1 1 5 10 20 10 10 10 10
当我创建一个外部表,加载数据并选择*,我得到了空值。请帮助如何显示数值而不是空值。我非常感谢你的帮助

create external table Teller(Name string, Bill array<int>)
row format delimited
fields terminated by ','
collection items terminated by '\t'
stored as textfile
location '/user/training/hive/Teller';

load data local inpath'/home/training/hive/input/*.txt' overwrite into table Teller;

似乎整数是用空格分隔的,而不是制表符

猛击

蜂巢

hive>创建外部表出纳(名称字符串、账单数组)
>行格式分隔
>以“,”结尾的字段
>收款项以“”终止
>存储为文本文件
>位置“/用户/培训/蜂巢/出纳员”;
好啊
所用时间:0.417秒
蜂巢>从出纳员中选择*;
好啊
史蒂夫[1,1,1,1,1,5,10,20,10,10,10,10]
不客气:-)请不要忘记接受答案
Steve   [null]
hdfs dfs -mkdir -p /user/training/hive/Teller
echo Steve,1 1 1 1 1 5 10 20 10 10 10 10 | hdfs dfs -put - /user/training/hive/Teller/data.txt
hive> create external table Teller(Name string, Bill array<int>)
    > row format delimited
    > fields terminated by ','
    > collection items terminated by ' '
    > stored as textfile
    > location '/user/training/hive/Teller';
OK
Time taken: 0.417 seconds
hive> select * from teller;
OK
Steve   [1,1,1,1,1,5,10,20,10,10,10,10]