You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by kunal chelani <ku...@gmail.com> on 2015/11/16 15:00:07 UTC

Help regarding finding a functionality in the source code

Hi Guys,

I am Kunal. I have been using zeppelin for some time now. I have made a few
changes in the code as well for my personal modifications and I am stuck at
one particular requirement. Here goes my doubt :

If we use the %sql of %hive interpreter and write something with the
pattern '${}' , a text box or a combo box appears on the interface but the
same does not happen when we use pyspark or any other interpreter, the same
does not happen.
I tried debugging a lot but could not find where exactly is the evaluation
of the input string of the paragraph is being done. It would be great if
you guys could help me out with this.

Thanks

-- 
Kunal Chelani
BITS-PIlani Hyderabad Campus
Ph: 09705635751

Re: Help regarding finding a functionality in the source code

Posted by moon soo Lee <mo...@apache.org>.
Hi Kunal,

Thanks for using Zeppelin.

Currently, there're PR
https://github.com/apache/incubator-zeppelin/pull/437 that adds dynamic
form feature into pyspark.

When Implementing an Interpreter, getFormType() abstract method need to be
implemented.
https://github.com/apache/incubator-zeppelin/blob/branch-0.5.5/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L82
.

This method can return

FormType.NATIVE : when interpreter want to generate dynamic form
programmatically  (like SparkInterpreter, interpreter need to implement API)
FormType.SIMPLE : when '${}' pattern is used. (like %sql)
FormType.NONE: when it does not want to anything

Zeppelin will recognize this return value and creates dynamic form in
desired way here
https://github.com/apache/incubator-zeppelin/blob/branch-0.5.5/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java#L197
.

Hope this helps.

Best,
moon

On Mon, Nov 16, 2015 at 11:02 PM kunal chelani <ku...@gmail.com>
wrote:

> Hi Guys,
>
> I am Kunal. I have been using zeppelin for some time now. I have made a few
> changes in the code as well for my personal modifications and I am stuck at
> one particular requirement. Here goes my doubt :
>
> If we use the %sql of %hive interpreter and write something with the
> pattern '${}' , a text box or a combo box appears on the interface but the
> same does not happen when we use pyspark or any other interpreter, the same
> does not happen.
> I tried debugging a lot but could not find where exactly is the evaluation
> of the input string of the paragraph is being done. It would be great if
> you guys could help me out with this.
>
> Thanks
>
> --
> Kunal Chelani
> BITS-PIlani Hyderabad Campus
> Ph: 09705635751
>