017 3:11 AM
To: David Howell<mailto:david.how...@zipmoney.com.au>
Cc: users@zeppelin.apache.org<mailto:users@zeppelin.apache.org>
Subject: Re: Can't run simple example with scala and spark SQL. Some non
obvious syntax error in SQL
Ah... sorry, so stupid. You are right. I've moved
%
u running the %sql in the same paragraph as the %spark? I don’t
> think that is supported. I think you have to shift the %sql to a new
> paragraph, you can then run the spark and then the sql separately.
>
>
>
> *From: *Serega Sheypak
> *Sent: *Tuesday, 2 May 2017 9:58 PM
>
ately.
From: Serega Sheypak<mailto:serega.shey...@gmail.com>
Sent: Tuesday, 2 May 2017 9:58 PM
To: users@zeppelin.apache.org<mailto:users@zeppelin.apache.org>
Subject: Can't run simple example with scala and spark SQL. Some non obvious
syntax error in SQL
Here is my
Just spark code works fine:
val linesText = sc.textFile("hdfs://my/file/onhdfs.txt")
case class Line(id:Long, firstField:String, secondField:String)
val lines = linesText.map{ line =>
val splitted = line.split(" ")
println("splitted => " + splitted)
Line(splitted(0).toLong, splitted
Here is my sample notebook:
%spark
val linesText = sc.textFile("hdfs://cluster/user/me/lines.txt")
case class Line(id:Long, firstField:String, secondField:String)
val lines = linesText.map{ line =>
val splitted = line.split(" ")
println("splitted => " + splitted)
Line(splitted(0).to