I've created a supersimple notebook:

-- 1 --
%dep

z.reset
z.load("com.databricks:spark-csv_2.10:1.2.0")

--2--
%spark

val smsFile = "/home/barabba/data/SMSSpamCollection.csv"
sqlContext.load("com.databricks.spark.csv", Map("path" -> smsFile, "header"
-> "true", "delimiter" -> "|")).registerTempTable("sms")

--3--
%sql
select * from sms

1 and 2 runs fine, while 3 displays the
java.lang.reflect.InvocationTargetException. I cannot find anything useful
in the logs.
If I add the paragraph

--4--
%spark
sqlContext.sql("select * from sms").show

it works correctly, showing the top rows of the table.
+--+----+--------------------+
|id|type|                text|
+--+----+--------------------+
| 0| ham|Go until jurong p...|
| 1| ham|Ok lar... Joking ...|
| 2|spam|Free entry in 2 a...|
| 3| ham|U dun say so earl...|
| 4| ham|Nah I don't think...|
| 5|spam|FreeMsg Hey there...|
| 6| ham|Even my brother i...|
| 7| ham|As per your reque...|
...

I'm using zeppelin-0.5.0-incubating-bin-spark-1.3.1_hadoop-2.3.


Any idea of what's going on? Thanks
- michele

Reply via email to