AnsweredAssumed Answered

Spark-zeppelin issue

Question asked by karthik474 on Dec 5, 2017
Latest reply on Dec 20, 2017 by MichaelSegel

Hi Team,

 

Installed zeppelin v7.3 and running a spark (v1.6) example fails with below error,

 

// Zeppelin creates and injects sc (SparkContext) and sqlContext (HiveContext or SqlContext)
// So you don't need create them manually
// load bank data
val bankText = sc.textFile(maprfs:///tmp/bank-full.csv")
case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)
val bank = bankText.map(s => s.split(";")).filter(s => s(0) != "\"age\"").map(
    s => Bank(s(0).toInt, 
            s(1).replaceAll("\"", ""),
            s(2).replaceAll("\"", ""),
            s(3).replaceAll("\"", ""),
            s(5).replaceAll("\"", "").toInt
        )
).toDF()
bank.registerTempTable("bank”)
<console>:7: error: identifier expected but case class found.
case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)

Outcomes