将数据插入配置单元表时出错

ncgqoxb0  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(471)

我正在尝试将“制表符分隔文件”中的一些数据插入到已创建的配置单元表中。我在配置单元表中创建了4个名为“users”的基本列。我正在使用以下命令:

load data local inpath 'D:\users.txt'
into table users;

运行上述命令后,我收到以下错误消息:

FAILED: SemanticException [Error 10028]: Line 1:23 Path is not legal ''D:\users.txt'': Source file system should be "file" if "local" is specified

我正在使用Windows7,并通过putty在amazon web服务上运行hive。任何帮助都将不胜感激。
短暂性脑缺血发作

h5qlskok

h5qlskok1#

因此,最后,如果有人试图从制表符分隔的文本文件向表中添加值,则以下命令应起作用:

hive> create table test_table(k string, v string) row format delimited fields terminated by '\t' stored as textfile;

相关问题