• 执行:load data local inpath '/home/hive/ranger_hive.txt' into table ranger_hive.ranger_hive_row_column;

  • 报错:Error: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''/home/hive/ranger_hive.txt'': No files matching path file:/home/hive/ranger_hive.txt (state=42000,code=40000)

Hive3.1.0 load data local inpath No files matching path file

  • 分析:从报错信息上看,是找不到文件,但是该路径下确实存在该文件。

  • 原因:当使用JDBC(HiveServer2使用场景)时,load data local inpath 导入选中的文件必须存在与HiveServer2节点的本地服务器上,若存在别的节点,报错如上。

  • 方法1:把文件上传到HDFS上,使用:load data inpath命令导入;

  • 方法2:把文件上传到HiveServer2所在节点的服务器上,使用:load data local inpath命令导入;

  • 使用方法2导入效果如下:
    Hive3.1.0 load data local inpath No files matching path file

相关文章:

  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-10-13
  • 2022-12-23
  • 2021-12-08
猜你喜欢
  • 2021-09-30
  • 2021-07-15
  • 2022-12-23
  • 2021-11-14
  • 2021-05-28
  • 2021-07-04
相关资源
相似解决方案