我想使用“LOAD DATA LOCAL INPATH..”在本地机器上导入文件
但是,我无法导入
$ beeline -u jdbc:hive2://example:10000 -e "LOAD DATA LOCAL INPATH 'tmp/file_20161024.dat' OVERWRITE INTO TABLE some_table PARTITION(dt=20161024);"
Connecting to jdbc:hive2://example:10000
Connected to: Apache Hive (version 2.1.0)
Driver: Hive JDBC (version 1.2.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Error: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''tmp/file_20161024.dat'': No files matching path file:/opt/hive/bin/tmp/file_20161024.dat (state=42000,code=40000)
Closing: 0: jdbc:hive2://example:10000
也许,因为文件在本地机器上,我认为它没有被导入。
如何使用本地文件作为导入文件
我使用直线(1.2.1)。
VirtualMachine 上有 Hiveserver(示例)。
谢谢!
更新
我尝试了以下。
beeline -u jdbc:hive2://example:10000 -e "LOAD DATA LOCAL INPATH '/Users/asari/workspace/tmp/file_20161024.dat' OVERWRITE INTO TABLE some_table PARTITION(dt=20161024);"
Connecting to jdbc:hive2://example:10000
Connected to: Apache Hive (version 2.1.0)
Driver: Hive JDBC (version 1.2.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Error: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''/Users/asari/workspace/tmp/file_20161024.dat'': No files matching path file:/Users/asari/workspace/tmp/file_20161024.dat (state=42000,code=40000)
Closing: 0: jdbc:hive2://example:10000