尝试将数据附加到配置单元表时,我遇到了一些问题。我正确地声明了会话会话:我可以从表中检索数据
SparkSession spark = SparkSession
.builder()
.appName("Java Spark SQL basic example")
.config("hive.metastore.uris", "thrift://localhost:9083")
.enableHiveSupport()
.master("local[*]")
.getOrCreate();
当尝试使用df.write().mode(SaveMode.Append).saveAsTable("sample.test_table");
我得到的附加一些数据时
Exception in thread "main" java.lang.ClassNotFoundException: Failed to find data source: hive. Please find packages at http://spark.apache.org/third-party-projects.html
我错过了什么?
编辑:使用 df.write().insertInto("prova2.test_table");
作品,不知道它是如何工作的