我試圖連接與highcharts飛艇的成員..couldnot Apache的飛艇連接到highcharts錯誤:值seriesCol不是org.apache.spark.sql.DataFrame
%spark
import com.knockdata.zeppelin.highcharts._
import com.knockdata.zeppelin.highcharts.model._
import sqlContext.implicits._
val Tokyo = Seq(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3,
18.3, 13.9, 9.6).map(("Tokyo", _))
val df = (Tokyo).toDF("city", "temperature")
df.show()
highcharts(df.seriesCol("city").series("y" -> col("temperature"))).plot()
這給
在火花解釋import com.knockdata.zeppelin.highcharts._
import com.knockdata.zeppelin.highcharts.model._
import sqlContext.implicits._
Tokyo: Seq[(String, Double)] = List((Tokyo,7.0), (Tokyo,6.9), (Tokyo,9.5), (Tokyo,14.5), (Tokyo,18.2), (Tokyo,21.5), (Tokyo,25.2), (Tokyo,26.5), (Tokyo,23.3), (Tokyo,18.3), (Tokyo,13.9), (Tokyo,9.6))
df: org.apache.spark.sql.DataFrame = [city: string, temperature: double]
+-----+-----------+
| city|temperature|
+-----+-----------+
|Tokyo| 7.0|
|Tokyo| 6.9|
|Tokyo| 9.5|
|Tokyo| 14.5|
|Tokyo| 18.2|
|Tokyo| 21.5|
|Tokyo| 25.2|
|Tokyo| 26.5|
|Tokyo| 23.3|
|Tokyo| 18.3|
|Tokyo| 13.9|
|Tokyo| 9.6|
+-----+-----------+
<console>:201: error: value seriesCol is not a member of org.apache.spark.sql.DataFrame
highcharts(df.seriesCol("city").series("y" -> col("temperature"))).plot()
我已添加的依賴性僞影作爲com.knockdata:zeppelin-highcharts:0.2
隨後https://github.com/knockdata/zeppelin-highcharts/blob/master/docs/DemoLineChart.md 和使用試圖銀行數據但得到
<console>:224: error: value series is not a member of org.apache.spark.rdd.RDD[Bank]
possible cause: maybe a semicolon is missing before `value series'?
.series("x" -> "age", "y" -> avg(col("income")))
請幫我在哪裏我錯了?可能是什麼問題呢? 在此先感謝
我使用飛艇0.6.0只。他們說:「如果你想運行你現有的飛艇,按照使用Zeppelin.',我需要再次使用碼頭?以及爲什麼銀行數據不起作用? –