我将平面文件中的数据加载到配置单元表时获取空值.
我的表结构是这样的:
hive> create table test_hive (id int,value string);
Run Code Online (Sandbox Code Playgroud)
我的平面文件是这样的:input.txt
1 a
2 b
3 c
4 d
5 e
6 F
7 G
8 j
Run Code Online (Sandbox Code Playgroud)
当我运行以下命令时,我得到空值:
hive> LOAD DATA LOCAL INPATH '/home/hduser/input.txt' OVERWRITE INTO TABLE test_hive;
hive> select * from test_hive;
OK<br>
NULL NULL
NULL NULL
NULL NULL
NULL NULL
NULL NULL
NULL NULL
NULL NULL
NULL NULL
Run Code Online (Sandbox Code Playgroud)
屏幕截图:
hive> create table test_hive (id int,value string);
OK
Time taken: 4.97 seconds
hive> show tables;
OK
test_hive
Time taken: 0.124 …Run Code Online (Sandbox Code Playgroud)