Purpose of %dep is loading external libraries to Zeppelin and distribute them to workers. For example, if your pre-loaded scala script needs to import spark-csv library, you will need to run dep interpreter first as below prior to running other scala, pyspark code: %dep z.load("com.databricks.spark-csv_2.10:1.3.0")
For your information, %dep interpreter load libraries only to %spark, %pyspark but not to %sql. If you have *table* made with spark-csv library, %spark z.show(sqlc.sql("select * from table") will work, %sql select * from table won't work. I am currently working on this bug so patch will be made soon. On Wed, Jan 20, 2016 at 6:17 PM, MichaelYoung <452611...@qq.com> wrote: > Thanks for the tip, but my analytic queries work fine after my Scala > script is pre-loaded. In my notebook, I just type in "%sql > SQL-QUERY-STATEMENT", and it works fine. What exactly is %dep used for ? I > never used this interpreter. > > > ------------------ 原始邮件 ------------------ > *发件人:* "bear gan";<bear...@hotmail.com>; > *发送时间:* 2016年1月21日(星期四) 上午10:14 > *收件人:* "Mina Lee"<mina...@apache.org>; " > users@zeppelin.incubator.apache.org"<users@zeppelin.incubator.apache.org>; > > *主题:* 答复: error: object jblas is not a member of package org > > Thanks so much! It works fine as I expected. > > > > Note that%dep interpreter should be used before %spark, %pyspark, %sql. > > > > > > > *发件人: *bear gan <bear...@hotmail.com> > *发送时间: *2016年1月20日 17:16 > *收件人: *Mina Lee <mina...@apache.org>; users@zeppelin.incubator.apache.org > *主题: *re: error: object jblas is not a member of package org > > > > Run > > ////////////////////////////////////////////////////////////////// > > %dep > > z.load("org.scalanlp:jblas:1.2.1") > > ////////////////////////////////////////////////////////////////// > > Out: > > dep interpreter not found > > > > > > > > > > Hi, > > > > have you tried to load jblas library using %dep interpreter? > > > > For example, you can try to run below: > > ``` > > %dep > > z.load("org.scalanlp:jblas:1.2.1") > > ``` > > > > And then run > > `import org.jblas.DoubleMatrix` in next paragraph. > > > > If you want to know another way to load external library, please check > "Dependency Management" section in > https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/interpreter/spark.html > > > > > Hope this helps. > > > > On Tue, Jan 19, 2016 at 11:46 PM, bear gan <bear...@hotmail.com> wrote: > > > > How to solve this problem? > > > //////////////////////////////////////////////////////////////////////////////// > > import org.jblas.DoubleMatrix > > <console>:21: error: object jblas is not a member of package org > > import org.jblas.DoubleMatrix > > > //////////////////////////////////////////////////////////////////////////////// > > > > > > > > > > > > >