执行spark任务时报错Table or view 'test' not found in database 'test_1'

执行数据入hive的spark任务时报错:

org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view 'test' not found in database 'test_1';

解决问题:

原因:部署环境的spark目录下conf里hive-site.xml文件没有更新,导致找不到数据库。

办法:将hive的conf目录中的hive-site.xml拷贝到spark目录下conf里,问题解决。

 

posted @ 2022-04-08 11:19  所思  阅读(943)  评论(0)    收藏  举报