Hi,

thank you for your interested in Zeppelin!

Couple of things I noticed: as you probably already know , %dep and %spark
parts should always be in separate paragraphs.

%spark already exposes sql context though `sqlc` variable, so you better
use sqlc.load("...") instead.

And of course to be able to use %spark interpreter in the notebook, you
need to make sure you have it binded (cog button, on the top right)

Hope this helps!

--
Kind regards,
Alex


On Mon, Sep 28, 2015 at 4:29 PM, Ryan <freelanceflashga...@gmail.com> wrote:

> Hi,
>
> In a Zeppelin notebook, I am trying to load a csv using the spark-csv
> package by databricks. I am using the Hortonworks sandbox to run Zeppelin
> on. Unfortunately, the methods I have been trying have not been working.
>
> My latest attempt is:
> %dep
> z.load("com.databricks:spark-csv_2.10:1.2.0")
> %spark
> val crimeData = "hdfs://
> sandbox.hortonworks.com:8020/user/root/data/crime_incidents_2013_CSV.csv"
> sqlContext.load("hdfs://
> sandbox.hortonworks.com:8020/user/root/data/crime_incidents_2013_CSV.csv",
> Map("path" -> crimeData, "header" -> "true")).registerTempTable("crimes")
>
> This is the error I receive:
> <console>:16: error: not found: value sqlContext sqlContext.load("hdfs://
> sandbox.hortonworks.com:8020/user/root/data/crime_incidents_2013_CSV.csv",
> Map("path" -> crimeData, "header" -> "true")).registerTempTable("crimes") ^
> <console>:12: error: not found: value % %spark ^
> Thank you for any help in advance,
> Ryan
>

Reply via email to