RE: Can't run simple example with scala and spark SQL. Some non obvious syntax error in SQL

2017-05-02 Thread David Howell
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 %

Re: Can't run simple example with scala and spark SQL. Some non obvious syntax error in SQL

2017-05-02 Thread Serega Sheypak
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 >

RE: Can't run simple example with scala and spark SQL. Some non obvious syntax error in SQL

2017-05-02 Thread David Howell
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

Re: Can't run simple example with scala and spark SQL. Some non obvious syntax error in SQL

2017-05-02 Thread Serega Sheypak
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

Can't run simple example with scala and spark SQL. Some non obvious syntax error in SQL

2017-05-02 Thread Serega Sheypak
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