【发布时间】:2017-08-21 22:44:36
【问题描述】:
我是sparklyr 的新手,还没有接受过任何正式培训 - 在这个问题之后会变得很明显。我也更多地站在统计学家的一边,这没有帮助。子设置 Spark DataFrame 后出现错误。
考虑以下示例:
library(sparklyr)
library(dplyr)
sc <- spark_connect(master = "local[*]")
iris_tbl <- copy_to(sc, iris, name="iris", overwrite=TRUE)
#check column names
colnames(iris_tbl)
#subset so only a few variables remain
subdf <- iris_tbl %>%
select(Sepal_Length,Species)
subdf <- spark_dataframe(subdf)
#error happens when I try this operation
spark_session(sc) %>%
invoke("table", "subdf")
我得到的错误是:
Error: org.apache.spark.sql.catalyst.analysis.NoSuchTableException
at org.apache.spark.sql.hive.client.ClientInterface$$anonfun$getTable$1.apply(ClientInterface.scala:122)
at org.apache.spark.sql.hive.client.ClientInterface$$anonfun$getTable$1.apply(ClientInterface.scala:122)
还有其他几行错误。
我不明白为什么会出现此错误。 “subdf” 是 Spark DataFrame。
【问题讨论】:
标签: r apache-spark apache-spark-sql sparklyr