You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by 임정택 <ka...@gmail.com> on 2015/12/15 04:37:37 UTC

Way to run notebook via REST API with dynamic content

Hi Zeppelin dev fellows,

I was finding a way to run notebook via REST API with dynamic variable, and
seems like there's no way to get it.

I found three ways to achieve that functionality (Sure there could be
more), please see below.

1. provide a way to update (I mean replace) content of the paragraph

pros.
Very flexible. In this case we can prepare notebook, and clone it, and
replace specific paragraph which contains assignation of variables.

cons.
I don't know about the side-effect. What if another user is playing
(especially modifying) with that notebook?

2. provide a way to put parameters when submitting run paragrath in REST API

pros.
Flexible enough, most promising way to have.

cons.
Is there a way to receive parameter without breaking use cases via UI? I
couldn't imagine it.
At first I was considering ZeppelinContext, but it is not global feature
(bound to Spark interpreter).

3. provide a way to have paragraphs when submitting create notebook in REST
API

pros.
It doesn't break anything. (right?) We just add paragraph(es) immediately
after creating notebook.

cons.
Restricted. We need to delete executed notebooks (garbages?) by hand.

I'm willing to contribute feature to Zeppelin, so when we decide the best
way (or ways) to accomplish, I'll try to implement it.

Please share your opinion. Thanks in advance!

Best,
Jungtaek Lim (HeartSaVioR)

Re: Way to run notebook via REST API with dynamic content

Posted by 임정택 <ka...@gmail.com>.
Moon (and the devs.),

I've submitted addition of the REST APIs I've stated, so please have a look.

- CRMD of the paragraph :
https://github.com/apache/incubator-zeppelin/pull/550
- Run paragraph with params (updating dynamic form values) :
https://github.com/apache/incubator-zeppelin/pull/541

I've also found that I can't see paragraph id without connecting /
inspecting via WebSocket. So I've also addressed "get notebook's
information" via REST API.
- Get notebook's information via REST API :
https://github.com/apache/incubator-zeppelin/pull/542

Thanks!
Jungtaek Lim (HeartSaVioR)


2015-12-16 10:09 GMT+09:00 임정택 <ka...@gmail.com>:

> Moon,
>
> I just addressed creating notebook with initial paragraphs via
> https://issues.apache.org/jira/browse/ZEPPELIN-506 and
> https://github.com/apache/incubator-zeppelin/pull/536.
> Please have a look.
>
> Next, I'll try to address these things,
>
> - CRUD of paragraph
> - run notebook (or paragraph) with specifying dynamic form values
>
> Thanks,
> Jungtaek Lim (HeartSaVioR)
>
>
> 2015-12-15 17:10 GMT+09:00 moon soo Lee <mo...@apache.org>:
>
>> Ah, if you mean create paragraphs with the text you want when creating
>> notebook using REST API, you're right, that is not supported now.
>>
>> I think having REST api for paragraph CRUD can be also helpful in that
>> cause.
>>
>> Thanks,
>> moon
>>
>> On Tue, Dec 15, 2015 at 4:46 PM 임정택 <ka...@gmail.com> wrote:
>>
>> > Hi moon soo,
>> >
>> > Thanks for the information. I'll try to have a look into websocket
>> > implementation.
>> >
>> > Regarding creating a notebook, currently NewNotebookRequest has just an
>> one
>> > field, "name", so I think it is not supported now. Please correct me if
>> I'm
>> > wrong.
>> > I'm working on this issue, and I'll try to come up new JIRA issue and
>> pull
>> > request. Stay tuned.
>> >
>> > Thanks!
>> > Jungtaek Lim (HeartSaVioR)
>> >
>> >
>> > 2015-12-15 16:33 GMT+09:00 moon soo Lee <mo...@apache.org>:
>> >
>> > > Hi Jungtaek Lim,
>> > >
>> > > I think run REST API with changing value of dynamic form make sense.
>> > > Run API implementation of websocket server already does the job.
>> > >
>> > > So +1 for having ability to changing value of dynamic form from the
>> run
>> > > REST API.
>> > >
>> > > Doesn't it already have a paragraph when creating a notebook via REST
>> > API?
>> > >
>> > > Thanks,
>> > > moon
>> > >
>> > > On Tue, Dec 15, 2015 at 2:25 PM 임정택 <ka...@gmail.com> wrote:
>> > >
>> > > > Yeah, actually that's what I thought it could be recognized as bad.
>> > > > It could make another confusion between the REST API and the UI, but
>> > > > someone can say it is acceptable since we already know which
>> paragraphs
>> > > > we're trying to run via REST API.
>> > > >
>> > > > If we agree that it is acceptable, I'll work on it and come up the
>> pull
>> > > > request.
>> > > >
>> > > > Btw, does it make sense to provide initial paragraphs when creating
>> a
>> > > > notebook via REST API?
>> > > > I think it is simplest (including side-effect) and easy to give it a
>> > try.
>> > > >
>> > > >
>> > > > 2015-12-15 13:53 GMT+09:00 Corneau Damien <co...@gmail.com>:
>> > > >
>> > > > > I guess the run paragraph REST API fall short on that point.
>> > > > > When the UI run a paragraph query, it sends to the backend an
>> object
>> > > with
>> > > > > more informations (like the form values).
>> > > > > So it should be possible to extend the current REST API call to
>> > accept
>> > > > > options (in order to override the original paragraph
>> configuration).
>> > > > > However keep in mind that the result of that query and those
>> > parameters
>> > > > > will be shown on the UI.
>> > > > >
>> > > > >
>> > > > > On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:
>> > > > >
>> > > > > > Corneau,
>> > > > > >
>> > > > > > Actual use case I'm trying to accomplish is a bit simple. One
>> > > notebook
>> > > > > > contains three paragraphs.
>> > > > > >
>> > > > > > 1. load fat jar which contains the code (dump contents of HBase
>> > table
>> > > > to
>> > > > > > HDFS)
>> > > > > >
>> > > > > > 2. set the variables (table name, hdfs path, etc.) which the
>> code
>> > > will
>> > > > > use
>> > > > > > > I'm using dynamic form at this paragraph
>> > > > > >
>> > > > > > 3. run the code!
>> > > > > >
>> > > > > > AFAIK, nothing can cover paragraph 2 via REST API. Is it
>> possible
>> > > with
>> > > > > > current Zeppelin?
>> > > > > >
>> > > > > >
>> > > > > > 2015-12-15 13:19 GMT+09:00 Corneau Damien <corneadoug@gmail.com
>> >:
>> > > > > >
>> > > > > > > Maybe if you could provide some actual use case (type of code,
>> > what
>> > > > you
>> > > > > > > want to replace, what do you want as output, where do you want
>> > that
>> > > > > > output,
>> > > > > > > what is the goal), it could help us giving you better advices.
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com>
>> wrote:
>> > > > > > >
>> > > > > > > > Thanks Corneau,
>> > > > > > > >
>> > > > > > > > I'm using dynamic form already.
>> > > > > > > > At the first glance, exposing field and getting value to /
>> from
>> > > > > dynamic
>> > > > > > > > form seems to be up to interpreter, so I'm wondering I can
>> set
>> > > the
>> > > > > > form's
>> > > > > > > > value via unified way.
>> > > > > > > >
>> > > > > > > > And I'm curious that we can accomplish this without
>> affecting
>> > any
>> > > > > other
>> > > > > > > > contexts.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <
>> > corneadoug@gmail.com
>> > > >:
>> > > > > > > >
>> > > > > > > > > I don't know about the Run paragraph API, but the option 2
>> > > should
>> > > > > > > already
>> > > > > > > > > be possible:
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com>
>> > > wrote:
>> > > > > > > > >
>> > > > > > > > > > Hi Zeppelin dev fellows,
>> > > > > > > > > >
>> > > > > > > > > > I was finding a way to run notebook via REST API with
>> > dynamic
>> > > > > > > variable,
>> > > > > > > > > and
>> > > > > > > > > > seems like there's no way to get it.
>> > > > > > > > > >
>> > > > > > > > > > I found three ways to achieve that functionality (Sure
>> > there
>> > > > > could
>> > > > > > be
>> > > > > > > > > > more), please see below.
>> > > > > > > > > >
>> > > > > > > > > > 1. provide a way to update (I mean replace) content of
>> the
>> > > > > > paragraph
>> > > > > > > > > >
>> > > > > > > > > > pros.
>> > > > > > > > > > Very flexible. In this case we can prepare notebook, and
>> > > clone
>> > > > > it,
>> > > > > > > and
>> > > > > > > > > > replace specific paragraph which contains assignation of
>> > > > > variables.
>> > > > > > > > > >
>> > > > > > > > > > cons.
>> > > > > > > > > > I don't know about the side-effect. What if another
>> user is
>> > > > > playing
>> > > > > > > > > > (especially modifying) with that notebook?
>> > > > > > > > > >
>> > > > > > > > > > 2. provide a way to put parameters when submitting run
>> > > > paragrath
>> > > > > in
>> > > > > > > > REST
>> > > > > > > > > > API
>> > > > > > > > > >
>> > > > > > > > > > pros.
>> > > > > > > > > > Flexible enough, most promising way to have.
>> > > > > > > > > >
>> > > > > > > > > > cons.
>> > > > > > > > > > Is there a way to receive parameter without breaking use
>> > > cases
>> > > > > via
>> > > > > > > UI?
>> > > > > > > > I
>> > > > > > > > > > couldn't imagine it.
>> > > > > > > > > > At first I was considering ZeppelinContext, but it is
>> not
>> > > > global
>> > > > > > > > feature
>> > > > > > > > > > (bound to Spark interpreter).
>> > > > > > > > > >
>> > > > > > > > > > 3. provide a way to have paragraphs when submitting
>> create
>> > > > > notebook
>> > > > > > > in
>> > > > > > > > > REST
>> > > > > > > > > > API
>> > > > > > > > > >
>> > > > > > > > > > pros.
>> > > > > > > > > > It doesn't break anything. (right?) We just add
>> > paragraph(es)
>> > > > > > > > immediately
>> > > > > > > > > > after creating notebook.
>> > > > > > > > > >
>> > > > > > > > > > cons.
>> > > > > > > > > > Restricted. We need to delete executed notebooks
>> > (garbages?)
>> > > by
>> > > > > > hand.
>> > > > > > > > > >
>> > > > > > > > > > I'm willing to contribute feature to Zeppelin, so when
>> we
>> > > > decide
>> > > > > > the
>> > > > > > > > best
>> > > > > > > > > > way (or ways) to accomplish, I'll try to implement it.
>> > > > > > > > > >
>> > > > > > > > > > Please share your opinion. Thanks in advance!
>> > > > > > > > > >
>> > > > > > > > > > Best,
>> > > > > > > > > > Jungtaek Lim (HeartSaVioR)
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > --
>> > > > > > > > Name : 임 정택
>> > > > > > > > Blog : http://www.heartsavior.net /
>> http://dev.heartsavior.net
>> > > > > > > > Twitter : http://twitter.com/heartsavior
>> > > > > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > > Name : 임 정택
>> > > > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
>> > > > > > Twitter : http://twitter.com/heartsavior
>> > > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Name : 임 정택
>> > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
>> > > > Twitter : http://twitter.com/heartsavior
>> > > > LinkedIn : http://www.linkedin.com/in/heartsavior
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Name : 임 정택
>> > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
>> > Twitter : http://twitter.com/heartsavior
>> > LinkedIn : http://www.linkedin.com/in/heartsavior
>> >
>>
>
>
>
> --
> Name : 임 정택
> Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> Twitter : http://twitter.com/heartsavior
> LinkedIn : http://www.linkedin.com/in/heartsavior
>



-- 
Name : 임 정택
Blog : http://www.heartsavior.net / http://dev.heartsavior.net
Twitter : http://twitter.com/heartsavior
LinkedIn : http://www.linkedin.com/in/heartsavior

Re: Way to run notebook via REST API with dynamic content

Posted by 임정택 <ka...@gmail.com>.
Moon,

I just addressed creating notebook with initial paragraphs via
https://issues.apache.org/jira/browse/ZEPPELIN-506 and
https://github.com/apache/incubator-zeppelin/pull/536.
Please have a look.

Next, I'll try to address these things,

- CRUD of paragraph
- run notebook (or paragraph) with specifying dynamic form values

Thanks,
Jungtaek Lim (HeartSaVioR)


2015-12-15 17:10 GMT+09:00 moon soo Lee <mo...@apache.org>:

> Ah, if you mean create paragraphs with the text you want when creating
> notebook using REST API, you're right, that is not supported now.
>
> I think having REST api for paragraph CRUD can be also helpful in that
> cause.
>
> Thanks,
> moon
>
> On Tue, Dec 15, 2015 at 4:46 PM 임정택 <ka...@gmail.com> wrote:
>
> > Hi moon soo,
> >
> > Thanks for the information. I'll try to have a look into websocket
> > implementation.
> >
> > Regarding creating a notebook, currently NewNotebookRequest has just an
> one
> > field, "name", so I think it is not supported now. Please correct me if
> I'm
> > wrong.
> > I'm working on this issue, and I'll try to come up new JIRA issue and
> pull
> > request. Stay tuned.
> >
> > Thanks!
> > Jungtaek Lim (HeartSaVioR)
> >
> >
> > 2015-12-15 16:33 GMT+09:00 moon soo Lee <mo...@apache.org>:
> >
> > > Hi Jungtaek Lim,
> > >
> > > I think run REST API with changing value of dynamic form make sense.
> > > Run API implementation of websocket server already does the job.
> > >
> > > So +1 for having ability to changing value of dynamic form from the run
> > > REST API.
> > >
> > > Doesn't it already have a paragraph when creating a notebook via REST
> > API?
> > >
> > > Thanks,
> > > moon
> > >
> > > On Tue, Dec 15, 2015 at 2:25 PM 임정택 <ka...@gmail.com> wrote:
> > >
> > > > Yeah, actually that's what I thought it could be recognized as bad.
> > > > It could make another confusion between the REST API and the UI, but
> > > > someone can say it is acceptable since we already know which
> paragraphs
> > > > we're trying to run via REST API.
> > > >
> > > > If we agree that it is acceptable, I'll work on it and come up the
> pull
> > > > request.
> > > >
> > > > Btw, does it make sense to provide initial paragraphs when creating a
> > > > notebook via REST API?
> > > > I think it is simplest (including side-effect) and easy to give it a
> > try.
> > > >
> > > >
> > > > 2015-12-15 13:53 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > > >
> > > > > I guess the run paragraph REST API fall short on that point.
> > > > > When the UI run a paragraph query, it sends to the backend an
> object
> > > with
> > > > > more informations (like the form values).
> > > > > So it should be possible to extend the current REST API call to
> > accept
> > > > > options (in order to override the original paragraph
> configuration).
> > > > > However keep in mind that the result of that query and those
> > parameters
> > > > > will be shown on the UI.
> > > > >
> > > > >
> > > > > On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:
> > > > >
> > > > > > Corneau,
> > > > > >
> > > > > > Actual use case I'm trying to accomplish is a bit simple. One
> > > notebook
> > > > > > contains three paragraphs.
> > > > > >
> > > > > > 1. load fat jar which contains the code (dump contents of HBase
> > table
> > > > to
> > > > > > HDFS)
> > > > > >
> > > > > > 2. set the variables (table name, hdfs path, etc.) which the code
> > > will
> > > > > use
> > > > > > > I'm using dynamic form at this paragraph
> > > > > >
> > > > > > 3. run the code!
> > > > > >
> > > > > > AFAIK, nothing can cover paragraph 2 via REST API. Is it possible
> > > with
> > > > > > current Zeppelin?
> > > > > >
> > > > > >
> > > > > > 2015-12-15 13:19 GMT+09:00 Corneau Damien <corneadoug@gmail.com
> >:
> > > > > >
> > > > > > > Maybe if you could provide some actual use case (type of code,
> > what
> > > > you
> > > > > > > want to replace, what do you want as output, where do you want
> > that
> > > > > > output,
> > > > > > > what is the goal), it could help us giving you better advices.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com>
> wrote:
> > > > > > >
> > > > > > > > Thanks Corneau,
> > > > > > > >
> > > > > > > > I'm using dynamic form already.
> > > > > > > > At the first glance, exposing field and getting value to /
> from
> > > > > dynamic
> > > > > > > > form seems to be up to interpreter, so I'm wondering I can
> set
> > > the
> > > > > > form's
> > > > > > > > value via unified way.
> > > > > > > >
> > > > > > > > And I'm curious that we can accomplish this without affecting
> > any
> > > > > other
> > > > > > > > contexts.
> > > > > > > >
> > > > > > > >
> > > > > > > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <
> > corneadoug@gmail.com
> > > >:
> > > > > > > >
> > > > > > > > > I don't know about the Run paragraph API, but the option 2
> > > should
> > > > > > > already
> > > > > > > > > be possible:
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com>
> > > wrote:
> > > > > > > > >
> > > > > > > > > > Hi Zeppelin dev fellows,
> > > > > > > > > >
> > > > > > > > > > I was finding a way to run notebook via REST API with
> > dynamic
> > > > > > > variable,
> > > > > > > > > and
> > > > > > > > > > seems like there's no way to get it.
> > > > > > > > > >
> > > > > > > > > > I found three ways to achieve that functionality (Sure
> > there
> > > > > could
> > > > > > be
> > > > > > > > > > more), please see below.
> > > > > > > > > >
> > > > > > > > > > 1. provide a way to update (I mean replace) content of
> the
> > > > > > paragraph
> > > > > > > > > >
> > > > > > > > > > pros.
> > > > > > > > > > Very flexible. In this case we can prepare notebook, and
> > > clone
> > > > > it,
> > > > > > > and
> > > > > > > > > > replace specific paragraph which contains assignation of
> > > > > variables.
> > > > > > > > > >
> > > > > > > > > > cons.
> > > > > > > > > > I don't know about the side-effect. What if another user
> is
> > > > > playing
> > > > > > > > > > (especially modifying) with that notebook?
> > > > > > > > > >
> > > > > > > > > > 2. provide a way to put parameters when submitting run
> > > > paragrath
> > > > > in
> > > > > > > > REST
> > > > > > > > > > API
> > > > > > > > > >
> > > > > > > > > > pros.
> > > > > > > > > > Flexible enough, most promising way to have.
> > > > > > > > > >
> > > > > > > > > > cons.
> > > > > > > > > > Is there a way to receive parameter without breaking use
> > > cases
> > > > > via
> > > > > > > UI?
> > > > > > > > I
> > > > > > > > > > couldn't imagine it.
> > > > > > > > > > At first I was considering ZeppelinContext, but it is not
> > > > global
> > > > > > > > feature
> > > > > > > > > > (bound to Spark interpreter).
> > > > > > > > > >
> > > > > > > > > > 3. provide a way to have paragraphs when submitting
> create
> > > > > notebook
> > > > > > > in
> > > > > > > > > REST
> > > > > > > > > > API
> > > > > > > > > >
> > > > > > > > > > pros.
> > > > > > > > > > It doesn't break anything. (right?) We just add
> > paragraph(es)
> > > > > > > > immediately
> > > > > > > > > > after creating notebook.
> > > > > > > > > >
> > > > > > > > > > cons.
> > > > > > > > > > Restricted. We need to delete executed notebooks
> > (garbages?)
> > > by
> > > > > > hand.
> > > > > > > > > >
> > > > > > > > > > I'm willing to contribute feature to Zeppelin, so when we
> > > > decide
> > > > > > the
> > > > > > > > best
> > > > > > > > > > way (or ways) to accomplish, I'll try to implement it.
> > > > > > > > > >
> > > > > > > > > > Please share your opinion. Thanks in advance!
> > > > > > > > > >
> > > > > > > > > > Best,
> > > > > > > > > > Jungtaek Lim (HeartSaVioR)
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Name : 임 정택
> > > > > > > > Blog : http://www.heartsavior.net /
> http://dev.heartsavior.net
> > > > > > > > Twitter : http://twitter.com/heartsavior
> > > > > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Name : 임 정택
> > > > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > > > Twitter : http://twitter.com/heartsavior
> > > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Name : 임 정택
> > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > Twitter : http://twitter.com/heartsavior
> > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > >
> > >
> >
> >
> >
> > --
> > Name : 임 정택
> > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > Twitter : http://twitter.com/heartsavior
> > LinkedIn : http://www.linkedin.com/in/heartsavior
> >
>



-- 
Name : 임 정택
Blog : http://www.heartsavior.net / http://dev.heartsavior.net
Twitter : http://twitter.com/heartsavior
LinkedIn : http://www.linkedin.com/in/heartsavior

Re: Way to run notebook via REST API with dynamic content

Posted by moon soo Lee <mo...@apache.org>.
Ah, if you mean create paragraphs with the text you want when creating
notebook using REST API, you're right, that is not supported now.

I think having REST api for paragraph CRUD can be also helpful in that
cause.

Thanks,
moon

On Tue, Dec 15, 2015 at 4:46 PM 임정택 <ka...@gmail.com> wrote:

> Hi moon soo,
>
> Thanks for the information. I'll try to have a look into websocket
> implementation.
>
> Regarding creating a notebook, currently NewNotebookRequest has just an one
> field, "name", so I think it is not supported now. Please correct me if I'm
> wrong.
> I'm working on this issue, and I'll try to come up new JIRA issue and pull
> request. Stay tuned.
>
> Thanks!
> Jungtaek Lim (HeartSaVioR)
>
>
> 2015-12-15 16:33 GMT+09:00 moon soo Lee <mo...@apache.org>:
>
> > Hi Jungtaek Lim,
> >
> > I think run REST API with changing value of dynamic form make sense.
> > Run API implementation of websocket server already does the job.
> >
> > So +1 for having ability to changing value of dynamic form from the run
> > REST API.
> >
> > Doesn't it already have a paragraph when creating a notebook via REST
> API?
> >
> > Thanks,
> > moon
> >
> > On Tue, Dec 15, 2015 at 2:25 PM 임정택 <ka...@gmail.com> wrote:
> >
> > > Yeah, actually that's what I thought it could be recognized as bad.
> > > It could make another confusion between the REST API and the UI, but
> > > someone can say it is acceptable since we already know which paragraphs
> > > we're trying to run via REST API.
> > >
> > > If we agree that it is acceptable, I'll work on it and come up the pull
> > > request.
> > >
> > > Btw, does it make sense to provide initial paragraphs when creating a
> > > notebook via REST API?
> > > I think it is simplest (including side-effect) and easy to give it a
> try.
> > >
> > >
> > > 2015-12-15 13:53 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > >
> > > > I guess the run paragraph REST API fall short on that point.
> > > > When the UI run a paragraph query, it sends to the backend an object
> > with
> > > > more informations (like the form values).
> > > > So it should be possible to extend the current REST API call to
> accept
> > > > options (in order to override the original paragraph configuration).
> > > > However keep in mind that the result of that query and those
> parameters
> > > > will be shown on the UI.
> > > >
> > > >
> > > > On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:
> > > >
> > > > > Corneau,
> > > > >
> > > > > Actual use case I'm trying to accomplish is a bit simple. One
> > notebook
> > > > > contains three paragraphs.
> > > > >
> > > > > 1. load fat jar which contains the code (dump contents of HBase
> table
> > > to
> > > > > HDFS)
> > > > >
> > > > > 2. set the variables (table name, hdfs path, etc.) which the code
> > will
> > > > use
> > > > > > I'm using dynamic form at this paragraph
> > > > >
> > > > > 3. run the code!
> > > > >
> > > > > AFAIK, nothing can cover paragraph 2 via REST API. Is it possible
> > with
> > > > > current Zeppelin?
> > > > >
> > > > >
> > > > > 2015-12-15 13:19 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > > > >
> > > > > > Maybe if you could provide some actual use case (type of code,
> what
> > > you
> > > > > > want to replace, what do you want as output, where do you want
> that
> > > > > output,
> > > > > > what is the goal), it could help us giving you better advices.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:
> > > > > >
> > > > > > > Thanks Corneau,
> > > > > > >
> > > > > > > I'm using dynamic form already.
> > > > > > > At the first glance, exposing field and getting value to / from
> > > > dynamic
> > > > > > > form seems to be up to interpreter, so I'm wondering I can set
> > the
> > > > > form's
> > > > > > > value via unified way.
> > > > > > >
> > > > > > > And I'm curious that we can accomplish this without affecting
> any
> > > > other
> > > > > > > contexts.
> > > > > > >
> > > > > > >
> > > > > > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <
> corneadoug@gmail.com
> > >:
> > > > > > >
> > > > > > > > I don't know about the Run paragraph API, but the option 2
> > should
> > > > > > already
> > > > > > > > be possible:
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com>
> > wrote:
> > > > > > > >
> > > > > > > > > Hi Zeppelin dev fellows,
> > > > > > > > >
> > > > > > > > > I was finding a way to run notebook via REST API with
> dynamic
> > > > > > variable,
> > > > > > > > and
> > > > > > > > > seems like there's no way to get it.
> > > > > > > > >
> > > > > > > > > I found three ways to achieve that functionality (Sure
> there
> > > > could
> > > > > be
> > > > > > > > > more), please see below.
> > > > > > > > >
> > > > > > > > > 1. provide a way to update (I mean replace) content of the
> > > > > paragraph
> > > > > > > > >
> > > > > > > > > pros.
> > > > > > > > > Very flexible. In this case we can prepare notebook, and
> > clone
> > > > it,
> > > > > > and
> > > > > > > > > replace specific paragraph which contains assignation of
> > > > variables.
> > > > > > > > >
> > > > > > > > > cons.
> > > > > > > > > I don't know about the side-effect. What if another user is
> > > > playing
> > > > > > > > > (especially modifying) with that notebook?
> > > > > > > > >
> > > > > > > > > 2. provide a way to put parameters when submitting run
> > > paragrath
> > > > in
> > > > > > > REST
> > > > > > > > > API
> > > > > > > > >
> > > > > > > > > pros.
> > > > > > > > > Flexible enough, most promising way to have.
> > > > > > > > >
> > > > > > > > > cons.
> > > > > > > > > Is there a way to receive parameter without breaking use
> > cases
> > > > via
> > > > > > UI?
> > > > > > > I
> > > > > > > > > couldn't imagine it.
> > > > > > > > > At first I was considering ZeppelinContext, but it is not
> > > global
> > > > > > > feature
> > > > > > > > > (bound to Spark interpreter).
> > > > > > > > >
> > > > > > > > > 3. provide a way to have paragraphs when submitting create
> > > > notebook
> > > > > > in
> > > > > > > > REST
> > > > > > > > > API
> > > > > > > > >
> > > > > > > > > pros.
> > > > > > > > > It doesn't break anything. (right?) We just add
> paragraph(es)
> > > > > > > immediately
> > > > > > > > > after creating notebook.
> > > > > > > > >
> > > > > > > > > cons.
> > > > > > > > > Restricted. We need to delete executed notebooks
> (garbages?)
> > by
> > > > > hand.
> > > > > > > > >
> > > > > > > > > I'm willing to contribute feature to Zeppelin, so when we
> > > decide
> > > > > the
> > > > > > > best
> > > > > > > > > way (or ways) to accomplish, I'll try to implement it.
> > > > > > > > >
> > > > > > > > > Please share your opinion. Thanks in advance!
> > > > > > > > >
> > > > > > > > > Best,
> > > > > > > > > Jungtaek Lim (HeartSaVioR)
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Name : 임 정택
> > > > > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > > > > Twitter : http://twitter.com/heartsavior
> > > > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Name : 임 정택
> > > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > > Twitter : http://twitter.com/heartsavior
> > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Name : 임 정택
> > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > Twitter : http://twitter.com/heartsavior
> > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > >
> >
>
>
>
> --
> Name : 임 정택
> Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> Twitter : http://twitter.com/heartsavior
> LinkedIn : http://www.linkedin.com/in/heartsavior
>

Re: Way to run notebook via REST API with dynamic content

Posted by 임정택 <ka...@gmail.com>.
Hi moon soo,

Thanks for the information. I'll try to have a look into websocket
implementation.

Regarding creating a notebook, currently NewNotebookRequest has just an one
field, "name", so I think it is not supported now. Please correct me if I'm
wrong.
I'm working on this issue, and I'll try to come up new JIRA issue and pull
request. Stay tuned.

Thanks!
Jungtaek Lim (HeartSaVioR)


2015-12-15 16:33 GMT+09:00 moon soo Lee <mo...@apache.org>:

> Hi Jungtaek Lim,
>
> I think run REST API with changing value of dynamic form make sense.
> Run API implementation of websocket server already does the job.
>
> So +1 for having ability to changing value of dynamic form from the run
> REST API.
>
> Doesn't it already have a paragraph when creating a notebook via REST API?
>
> Thanks,
> moon
>
> On Tue, Dec 15, 2015 at 2:25 PM 임정택 <ka...@gmail.com> wrote:
>
> > Yeah, actually that's what I thought it could be recognized as bad.
> > It could make another confusion between the REST API and the UI, but
> > someone can say it is acceptable since we already know which paragraphs
> > we're trying to run via REST API.
> >
> > If we agree that it is acceptable, I'll work on it and come up the pull
> > request.
> >
> > Btw, does it make sense to provide initial paragraphs when creating a
> > notebook via REST API?
> > I think it is simplest (including side-effect) and easy to give it a try.
> >
> >
> > 2015-12-15 13:53 GMT+09:00 Corneau Damien <co...@gmail.com>:
> >
> > > I guess the run paragraph REST API fall short on that point.
> > > When the UI run a paragraph query, it sends to the backend an object
> with
> > > more informations (like the form values).
> > > So it should be possible to extend the current REST API call to accept
> > > options (in order to override the original paragraph configuration).
> > > However keep in mind that the result of that query and those parameters
> > > will be shown on the UI.
> > >
> > >
> > > On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:
> > >
> > > > Corneau,
> > > >
> > > > Actual use case I'm trying to accomplish is a bit simple. One
> notebook
> > > > contains three paragraphs.
> > > >
> > > > 1. load fat jar which contains the code (dump contents of HBase table
> > to
> > > > HDFS)
> > > >
> > > > 2. set the variables (table name, hdfs path, etc.) which the code
> will
> > > use
> > > > > I'm using dynamic form at this paragraph
> > > >
> > > > 3. run the code!
> > > >
> > > > AFAIK, nothing can cover paragraph 2 via REST API. Is it possible
> with
> > > > current Zeppelin?
> > > >
> > > >
> > > > 2015-12-15 13:19 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > > >
> > > > > Maybe if you could provide some actual use case (type of code, what
> > you
> > > > > want to replace, what do you want as output, where do you want that
> > > > output,
> > > > > what is the goal), it could help us giving you better advices.
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:
> > > > >
> > > > > > Thanks Corneau,
> > > > > >
> > > > > > I'm using dynamic form already.
> > > > > > At the first glance, exposing field and getting value to / from
> > > dynamic
> > > > > > form seems to be up to interpreter, so I'm wondering I can set
> the
> > > > form's
> > > > > > value via unified way.
> > > > > >
> > > > > > And I'm curious that we can accomplish this without affecting any
> > > other
> > > > > > contexts.
> > > > > >
> > > > > >
> > > > > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <corneadoug@gmail.com
> >:
> > > > > >
> > > > > > > I don't know about the Run paragraph API, but the option 2
> should
> > > > > already
> > > > > > > be possible:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com>
> wrote:
> > > > > > >
> > > > > > > > Hi Zeppelin dev fellows,
> > > > > > > >
> > > > > > > > I was finding a way to run notebook via REST API with dynamic
> > > > > variable,
> > > > > > > and
> > > > > > > > seems like there's no way to get it.
> > > > > > > >
> > > > > > > > I found three ways to achieve that functionality (Sure there
> > > could
> > > > be
> > > > > > > > more), please see below.
> > > > > > > >
> > > > > > > > 1. provide a way to update (I mean replace) content of the
> > > > paragraph
> > > > > > > >
> > > > > > > > pros.
> > > > > > > > Very flexible. In this case we can prepare notebook, and
> clone
> > > it,
> > > > > and
> > > > > > > > replace specific paragraph which contains assignation of
> > > variables.
> > > > > > > >
> > > > > > > > cons.
> > > > > > > > I don't know about the side-effect. What if another user is
> > > playing
> > > > > > > > (especially modifying) with that notebook?
> > > > > > > >
> > > > > > > > 2. provide a way to put parameters when submitting run
> > paragrath
> > > in
> > > > > > REST
> > > > > > > > API
> > > > > > > >
> > > > > > > > pros.
> > > > > > > > Flexible enough, most promising way to have.
> > > > > > > >
> > > > > > > > cons.
> > > > > > > > Is there a way to receive parameter without breaking use
> cases
> > > via
> > > > > UI?
> > > > > > I
> > > > > > > > couldn't imagine it.
> > > > > > > > At first I was considering ZeppelinContext, but it is not
> > global
> > > > > > feature
> > > > > > > > (bound to Spark interpreter).
> > > > > > > >
> > > > > > > > 3. provide a way to have paragraphs when submitting create
> > > notebook
> > > > > in
> > > > > > > REST
> > > > > > > > API
> > > > > > > >
> > > > > > > > pros.
> > > > > > > > It doesn't break anything. (right?) We just add paragraph(es)
> > > > > > immediately
> > > > > > > > after creating notebook.
> > > > > > > >
> > > > > > > > cons.
> > > > > > > > Restricted. We need to delete executed notebooks (garbages?)
> by
> > > > hand.
> > > > > > > >
> > > > > > > > I'm willing to contribute feature to Zeppelin, so when we
> > decide
> > > > the
> > > > > > best
> > > > > > > > way (or ways) to accomplish, I'll try to implement it.
> > > > > > > >
> > > > > > > > Please share your opinion. Thanks in advance!
> > > > > > > >
> > > > > > > > Best,
> > > > > > > > Jungtaek Lim (HeartSaVioR)
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Name : 임 정택
> > > > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > > > Twitter : http://twitter.com/heartsavior
> > > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Name : 임 정택
> > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > Twitter : http://twitter.com/heartsavior
> > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > >
> > >
> >
> >
> >
> > --
> > Name : 임 정택
> > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > Twitter : http://twitter.com/heartsavior
> > LinkedIn : http://www.linkedin.com/in/heartsavior
> >
>



-- 
Name : 임 정택
Blog : http://www.heartsavior.net / http://dev.heartsavior.net
Twitter : http://twitter.com/heartsavior
LinkedIn : http://www.linkedin.com/in/heartsavior

Re: Way to run notebook via REST API with dynamic content

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

I think run REST API with changing value of dynamic form make sense.
Run API implementation of websocket server already does the job.

So +1 for having ability to changing value of dynamic form from the run
REST API.

Doesn't it already have a paragraph when creating a notebook via REST API?

Thanks,
moon

On Tue, Dec 15, 2015 at 2:25 PM 임정택 <ka...@gmail.com> wrote:

> Yeah, actually that's what I thought it could be recognized as bad.
> It could make another confusion between the REST API and the UI, but
> someone can say it is acceptable since we already know which paragraphs
> we're trying to run via REST API.
>
> If we agree that it is acceptable, I'll work on it and come up the pull
> request.
>
> Btw, does it make sense to provide initial paragraphs when creating a
> notebook via REST API?
> I think it is simplest (including side-effect) and easy to give it a try.
>
>
> 2015-12-15 13:53 GMT+09:00 Corneau Damien <co...@gmail.com>:
>
> > I guess the run paragraph REST API fall short on that point.
> > When the UI run a paragraph query, it sends to the backend an object with
> > more informations (like the form values).
> > So it should be possible to extend the current REST API call to accept
> > options (in order to override the original paragraph configuration).
> > However keep in mind that the result of that query and those parameters
> > will be shown on the UI.
> >
> >
> > On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:
> >
> > > Corneau,
> > >
> > > Actual use case I'm trying to accomplish is a bit simple. One notebook
> > > contains three paragraphs.
> > >
> > > 1. load fat jar which contains the code (dump contents of HBase table
> to
> > > HDFS)
> > >
> > > 2. set the variables (table name, hdfs path, etc.) which the code will
> > use
> > > > I'm using dynamic form at this paragraph
> > >
> > > 3. run the code!
> > >
> > > AFAIK, nothing can cover paragraph 2 via REST API. Is it possible with
> > > current Zeppelin?
> > >
> > >
> > > 2015-12-15 13:19 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > >
> > > > Maybe if you could provide some actual use case (type of code, what
> you
> > > > want to replace, what do you want as output, where do you want that
> > > output,
> > > > what is the goal), it could help us giving you better advices.
> > > >
> > > >
> > > >
> > > > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:
> > > >
> > > > > Thanks Corneau,
> > > > >
> > > > > I'm using dynamic form already.
> > > > > At the first glance, exposing field and getting value to / from
> > dynamic
> > > > > form seems to be up to interpreter, so I'm wondering I can set the
> > > form's
> > > > > value via unified way.
> > > > >
> > > > > And I'm curious that we can accomplish this without affecting any
> > other
> > > > > contexts.
> > > > >
> > > > >
> > > > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > > > >
> > > > > > I don't know about the Run paragraph API, but the option 2 should
> > > > already
> > > > > > be possible:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:
> > > > > >
> > > > > > > Hi Zeppelin dev fellows,
> > > > > > >
> > > > > > > I was finding a way to run notebook via REST API with dynamic
> > > > variable,
> > > > > > and
> > > > > > > seems like there's no way to get it.
> > > > > > >
> > > > > > > I found three ways to achieve that functionality (Sure there
> > could
> > > be
> > > > > > > more), please see below.
> > > > > > >
> > > > > > > 1. provide a way to update (I mean replace) content of the
> > > paragraph
> > > > > > >
> > > > > > > pros.
> > > > > > > Very flexible. In this case we can prepare notebook, and clone
> > it,
> > > > and
> > > > > > > replace specific paragraph which contains assignation of
> > variables.
> > > > > > >
> > > > > > > cons.
> > > > > > > I don't know about the side-effect. What if another user is
> > playing
> > > > > > > (especially modifying) with that notebook?
> > > > > > >
> > > > > > > 2. provide a way to put parameters when submitting run
> paragrath
> > in
> > > > > REST
> > > > > > > API
> > > > > > >
> > > > > > > pros.
> > > > > > > Flexible enough, most promising way to have.
> > > > > > >
> > > > > > > cons.
> > > > > > > Is there a way to receive parameter without breaking use cases
> > via
> > > > UI?
> > > > > I
> > > > > > > couldn't imagine it.
> > > > > > > At first I was considering ZeppelinContext, but it is not
> global
> > > > > feature
> > > > > > > (bound to Spark interpreter).
> > > > > > >
> > > > > > > 3. provide a way to have paragraphs when submitting create
> > notebook
> > > > in
> > > > > > REST
> > > > > > > API
> > > > > > >
> > > > > > > pros.
> > > > > > > It doesn't break anything. (right?) We just add paragraph(es)
> > > > > immediately
> > > > > > > after creating notebook.
> > > > > > >
> > > > > > > cons.
> > > > > > > Restricted. We need to delete executed notebooks (garbages?) by
> > > hand.
> > > > > > >
> > > > > > > I'm willing to contribute feature to Zeppelin, so when we
> decide
> > > the
> > > > > best
> > > > > > > way (or ways) to accomplish, I'll try to implement it.
> > > > > > >
> > > > > > > Please share your opinion. Thanks in advance!
> > > > > > >
> > > > > > > Best,
> > > > > > > Jungtaek Lim (HeartSaVioR)
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Name : 임 정택
> > > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > > Twitter : http://twitter.com/heartsavior
> > > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Name : 임 정택
> > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > Twitter : http://twitter.com/heartsavior
> > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > >
> >
>
>
>
> --
> Name : 임 정택
> Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> Twitter : http://twitter.com/heartsavior
> LinkedIn : http://www.linkedin.com/in/heartsavior
>

Re: Way to run notebook via REST API with dynamic content

Posted by 임정택 <ka...@gmail.com>.
Yeah, actually that's what I thought it could be recognized as bad.
It could make another confusion between the REST API and the UI, but
someone can say it is acceptable since we already know which paragraphs
we're trying to run via REST API.

If we agree that it is acceptable, I'll work on it and come up the pull
request.

Btw, does it make sense to provide initial paragraphs when creating a
notebook via REST API?
I think it is simplest (including side-effect) and easy to give it a try.


2015-12-15 13:53 GMT+09:00 Corneau Damien <co...@gmail.com>:

> I guess the run paragraph REST API fall short on that point.
> When the UI run a paragraph query, it sends to the backend an object with
> more informations (like the form values).
> So it should be possible to extend the current REST API call to accept
> options (in order to override the original paragraph configuration).
> However keep in mind that the result of that query and those parameters
> will be shown on the UI.
>
>
> On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:
>
> > Corneau,
> >
> > Actual use case I'm trying to accomplish is a bit simple. One notebook
> > contains three paragraphs.
> >
> > 1. load fat jar which contains the code (dump contents of HBase table to
> > HDFS)
> >
> > 2. set the variables (table name, hdfs path, etc.) which the code will
> use
> > > I'm using dynamic form at this paragraph
> >
> > 3. run the code!
> >
> > AFAIK, nothing can cover paragraph 2 via REST API. Is it possible with
> > current Zeppelin?
> >
> >
> > 2015-12-15 13:19 GMT+09:00 Corneau Damien <co...@gmail.com>:
> >
> > > Maybe if you could provide some actual use case (type of code, what you
> > > want to replace, what do you want as output, where do you want that
> > output,
> > > what is the goal), it could help us giving you better advices.
> > >
> > >
> > >
> > > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:
> > >
> > > > Thanks Corneau,
> > > >
> > > > I'm using dynamic form already.
> > > > At the first glance, exposing field and getting value to / from
> dynamic
> > > > form seems to be up to interpreter, so I'm wondering I can set the
> > form's
> > > > value via unified way.
> > > >
> > > > And I'm curious that we can accomplish this without affecting any
> other
> > > > contexts.
> > > >
> > > >
> > > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > > >
> > > > > I don't know about the Run paragraph API, but the option 2 should
> > > already
> > > > > be possible:
> > > > >
> > > > >
> > > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:
> > > > >
> > > > > > Hi Zeppelin dev fellows,
> > > > > >
> > > > > > I was finding a way to run notebook via REST API with dynamic
> > > variable,
> > > > > and
> > > > > > seems like there's no way to get it.
> > > > > >
> > > > > > I found three ways to achieve that functionality (Sure there
> could
> > be
> > > > > > more), please see below.
> > > > > >
> > > > > > 1. provide a way to update (I mean replace) content of the
> > paragraph
> > > > > >
> > > > > > pros.
> > > > > > Very flexible. In this case we can prepare notebook, and clone
> it,
> > > and
> > > > > > replace specific paragraph which contains assignation of
> variables.
> > > > > >
> > > > > > cons.
> > > > > > I don't know about the side-effect. What if another user is
> playing
> > > > > > (especially modifying) with that notebook?
> > > > > >
> > > > > > 2. provide a way to put parameters when submitting run paragrath
> in
> > > > REST
> > > > > > API
> > > > > >
> > > > > > pros.
> > > > > > Flexible enough, most promising way to have.
> > > > > >
> > > > > > cons.
> > > > > > Is there a way to receive parameter without breaking use cases
> via
> > > UI?
> > > > I
> > > > > > couldn't imagine it.
> > > > > > At first I was considering ZeppelinContext, but it is not global
> > > > feature
> > > > > > (bound to Spark interpreter).
> > > > > >
> > > > > > 3. provide a way to have paragraphs when submitting create
> notebook
> > > in
> > > > > REST
> > > > > > API
> > > > > >
> > > > > > pros.
> > > > > > It doesn't break anything. (right?) We just add paragraph(es)
> > > > immediately
> > > > > > after creating notebook.
> > > > > >
> > > > > > cons.
> > > > > > Restricted. We need to delete executed notebooks (garbages?) by
> > hand.
> > > > > >
> > > > > > I'm willing to contribute feature to Zeppelin, so when we decide
> > the
> > > > best
> > > > > > way (or ways) to accomplish, I'll try to implement it.
> > > > > >
> > > > > > Please share your opinion. Thanks in advance!
> > > > > >
> > > > > > Best,
> > > > > > Jungtaek Lim (HeartSaVioR)
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Name : 임 정택
> > > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > > Twitter : http://twitter.com/heartsavior
> > > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > > >
> > >
> >
> >
> >
> > --
> > Name : 임 정택
> > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > Twitter : http://twitter.com/heartsavior
> > LinkedIn : http://www.linkedin.com/in/heartsavior
> >
>



-- 
Name : 임 정택
Blog : http://www.heartsavior.net / http://dev.heartsavior.net
Twitter : http://twitter.com/heartsavior
LinkedIn : http://www.linkedin.com/in/heartsavior

Re: Way to run notebook via REST API with dynamic content

Posted by Corneau Damien <co...@gmail.com>.
I guess the run paragraph REST API fall short on that point.
When the UI run a paragraph query, it sends to the backend an object with
more informations (like the form values).
So it should be possible to extend the current REST API call to accept
options (in order to override the original paragraph configuration).
However keep in mind that the result of that query and those parameters
will be shown on the UI.


On Tue, Dec 15, 2015 at 1:33 PM, 임정택 <ka...@gmail.com> wrote:

> Corneau,
>
> Actual use case I'm trying to accomplish is a bit simple. One notebook
> contains three paragraphs.
>
> 1. load fat jar which contains the code (dump contents of HBase table to
> HDFS)
>
> 2. set the variables (table name, hdfs path, etc.) which the code will use
> > I'm using dynamic form at this paragraph
>
> 3. run the code!
>
> AFAIK, nothing can cover paragraph 2 via REST API. Is it possible with
> current Zeppelin?
>
>
> 2015-12-15 13:19 GMT+09:00 Corneau Damien <co...@gmail.com>:
>
> > Maybe if you could provide some actual use case (type of code, what you
> > want to replace, what do you want as output, where do you want that
> output,
> > what is the goal), it could help us giving you better advices.
> >
> >
> >
> > On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:
> >
> > > Thanks Corneau,
> > >
> > > I'm using dynamic form already.
> > > At the first glance, exposing field and getting value to / from dynamic
> > > form seems to be up to interpreter, so I'm wondering I can set the
> form's
> > > value via unified way.
> > >
> > > And I'm curious that we can accomplish this without affecting any other
> > > contexts.
> > >
> > >
> > > 2015-12-15 12:42 GMT+09:00 Corneau Damien <co...@gmail.com>:
> > >
> > > > I don't know about the Run paragraph API, but the option 2 should
> > already
> > > > be possible:
> > > >
> > > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > > >
> > > >
> > > >
> > > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:
> > > >
> > > > > Hi Zeppelin dev fellows,
> > > > >
> > > > > I was finding a way to run notebook via REST API with dynamic
> > variable,
> > > > and
> > > > > seems like there's no way to get it.
> > > > >
> > > > > I found three ways to achieve that functionality (Sure there could
> be
> > > > > more), please see below.
> > > > >
> > > > > 1. provide a way to update (I mean replace) content of the
> paragraph
> > > > >
> > > > > pros.
> > > > > Very flexible. In this case we can prepare notebook, and clone it,
> > and
> > > > > replace specific paragraph which contains assignation of variables.
> > > > >
> > > > > cons.
> > > > > I don't know about the side-effect. What if another user is playing
> > > > > (especially modifying) with that notebook?
> > > > >
> > > > > 2. provide a way to put parameters when submitting run paragrath in
> > > REST
> > > > > API
> > > > >
> > > > > pros.
> > > > > Flexible enough, most promising way to have.
> > > > >
> > > > > cons.
> > > > > Is there a way to receive parameter without breaking use cases via
> > UI?
> > > I
> > > > > couldn't imagine it.
> > > > > At first I was considering ZeppelinContext, but it is not global
> > > feature
> > > > > (bound to Spark interpreter).
> > > > >
> > > > > 3. provide a way to have paragraphs when submitting create notebook
> > in
> > > > REST
> > > > > API
> > > > >
> > > > > pros.
> > > > > It doesn't break anything. (right?) We just add paragraph(es)
> > > immediately
> > > > > after creating notebook.
> > > > >
> > > > > cons.
> > > > > Restricted. We need to delete executed notebooks (garbages?) by
> hand.
> > > > >
> > > > > I'm willing to contribute feature to Zeppelin, so when we decide
> the
> > > best
> > > > > way (or ways) to accomplish, I'll try to implement it.
> > > > >
> > > > > Please share your opinion. Thanks in advance!
> > > > >
> > > > > Best,
> > > > > Jungtaek Lim (HeartSaVioR)
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Name : 임 정택
> > > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > > Twitter : http://twitter.com/heartsavior
> > > LinkedIn : http://www.linkedin.com/in/heartsavior
> > >
> >
>
>
>
> --
> Name : 임 정택
> Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> Twitter : http://twitter.com/heartsavior
> LinkedIn : http://www.linkedin.com/in/heartsavior
>

Re: Way to run notebook via REST API with dynamic content

Posted by 임정택 <ka...@gmail.com>.
Corneau,

Actual use case I'm trying to accomplish is a bit simple. One notebook
contains three paragraphs.

1. load fat jar which contains the code (dump contents of HBase table to
HDFS)

2. set the variables (table name, hdfs path, etc.) which the code will use
> I'm using dynamic form at this paragraph

3. run the code!

AFAIK, nothing can cover paragraph 2 via REST API. Is it possible with
current Zeppelin?


2015-12-15 13:19 GMT+09:00 Corneau Damien <co...@gmail.com>:

> Maybe if you could provide some actual use case (type of code, what you
> want to replace, what do you want as output, where do you want that output,
> what is the goal), it could help us giving you better advices.
>
>
>
> On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:
>
> > Thanks Corneau,
> >
> > I'm using dynamic form already.
> > At the first glance, exposing field and getting value to / from dynamic
> > form seems to be up to interpreter, so I'm wondering I can set the form's
> > value via unified way.
> >
> > And I'm curious that we can accomplish this without affecting any other
> > contexts.
> >
> >
> > 2015-12-15 12:42 GMT+09:00 Corneau Damien <co...@gmail.com>:
> >
> > > I don't know about the Run paragraph API, but the option 2 should
> already
> > > be possible:
> > >
> > >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> > >
> > >
> > >
> > > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:
> > >
> > > > Hi Zeppelin dev fellows,
> > > >
> > > > I was finding a way to run notebook via REST API with dynamic
> variable,
> > > and
> > > > seems like there's no way to get it.
> > > >
> > > > I found three ways to achieve that functionality (Sure there could be
> > > > more), please see below.
> > > >
> > > > 1. provide a way to update (I mean replace) content of the paragraph
> > > >
> > > > pros.
> > > > Very flexible. In this case we can prepare notebook, and clone it,
> and
> > > > replace specific paragraph which contains assignation of variables.
> > > >
> > > > cons.
> > > > I don't know about the side-effect. What if another user is playing
> > > > (especially modifying) with that notebook?
> > > >
> > > > 2. provide a way to put parameters when submitting run paragrath in
> > REST
> > > > API
> > > >
> > > > pros.
> > > > Flexible enough, most promising way to have.
> > > >
> > > > cons.
> > > > Is there a way to receive parameter without breaking use cases via
> UI?
> > I
> > > > couldn't imagine it.
> > > > At first I was considering ZeppelinContext, but it is not global
> > feature
> > > > (bound to Spark interpreter).
> > > >
> > > > 3. provide a way to have paragraphs when submitting create notebook
> in
> > > REST
> > > > API
> > > >
> > > > pros.
> > > > It doesn't break anything. (right?) We just add paragraph(es)
> > immediately
> > > > after creating notebook.
> > > >
> > > > cons.
> > > > Restricted. We need to delete executed notebooks (garbages?) by hand.
> > > >
> > > > I'm willing to contribute feature to Zeppelin, so when we decide the
> > best
> > > > way (or ways) to accomplish, I'll try to implement it.
> > > >
> > > > Please share your opinion. Thanks in advance!
> > > >
> > > > Best,
> > > > Jungtaek Lim (HeartSaVioR)
> > > >
> > >
> >
> >
> >
> > --
> > Name : 임 정택
> > Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> > Twitter : http://twitter.com/heartsavior
> > LinkedIn : http://www.linkedin.com/in/heartsavior
> >
>



-- 
Name : 임 정택
Blog : http://www.heartsavior.net / http://dev.heartsavior.net
Twitter : http://twitter.com/heartsavior
LinkedIn : http://www.linkedin.com/in/heartsavior

Re: Way to run notebook via REST API with dynamic content

Posted by Corneau Damien <co...@gmail.com>.
Maybe if you could provide some actual use case (type of code, what you
want to replace, what do you want as output, where do you want that output,
what is the goal), it could help us giving you better advices.



On Tue, Dec 15, 2015 at 1:09 PM, 임정택 <ka...@gmail.com> wrote:

> Thanks Corneau,
>
> I'm using dynamic form already.
> At the first glance, exposing field and getting value to / from dynamic
> form seems to be up to interpreter, so I'm wondering I can set the form's
> value via unified way.
>
> And I'm curious that we can accomplish this without affecting any other
> contexts.
>
>
> 2015-12-15 12:42 GMT+09:00 Corneau Damien <co...@gmail.com>:
>
> > I don't know about the Run paragraph API, but the option 2 should already
> > be possible:
> >
> >
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
> >
> >
> >
> > On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:
> >
> > > Hi Zeppelin dev fellows,
> > >
> > > I was finding a way to run notebook via REST API with dynamic variable,
> > and
> > > seems like there's no way to get it.
> > >
> > > I found three ways to achieve that functionality (Sure there could be
> > > more), please see below.
> > >
> > > 1. provide a way to update (I mean replace) content of the paragraph
> > >
> > > pros.
> > > Very flexible. In this case we can prepare notebook, and clone it, and
> > > replace specific paragraph which contains assignation of variables.
> > >
> > > cons.
> > > I don't know about the side-effect. What if another user is playing
> > > (especially modifying) with that notebook?
> > >
> > > 2. provide a way to put parameters when submitting run paragrath in
> REST
> > > API
> > >
> > > pros.
> > > Flexible enough, most promising way to have.
> > >
> > > cons.
> > > Is there a way to receive parameter without breaking use cases via UI?
> I
> > > couldn't imagine it.
> > > At first I was considering ZeppelinContext, but it is not global
> feature
> > > (bound to Spark interpreter).
> > >
> > > 3. provide a way to have paragraphs when submitting create notebook in
> > REST
> > > API
> > >
> > > pros.
> > > It doesn't break anything. (right?) We just add paragraph(es)
> immediately
> > > after creating notebook.
> > >
> > > cons.
> > > Restricted. We need to delete executed notebooks (garbages?) by hand.
> > >
> > > I'm willing to contribute feature to Zeppelin, so when we decide the
> best
> > > way (or ways) to accomplish, I'll try to implement it.
> > >
> > > Please share your opinion. Thanks in advance!
> > >
> > > Best,
> > > Jungtaek Lim (HeartSaVioR)
> > >
> >
>
>
>
> --
> Name : 임 정택
> Blog : http://www.heartsavior.net / http://dev.heartsavior.net
> Twitter : http://twitter.com/heartsavior
> LinkedIn : http://www.linkedin.com/in/heartsavior
>

Re: Way to run notebook via REST API with dynamic content

Posted by 임정택 <ka...@gmail.com>.
Thanks Corneau,

I'm using dynamic form already.
At the first glance, exposing field and getting value to / from dynamic
form seems to be up to interpreter, so I'm wondering I can set the form's
value via unified way.

And I'm curious that we can accomplish this without affecting any other
contexts.


2015-12-15 12:42 GMT+09:00 Corneau Damien <co...@gmail.com>:

> I don't know about the Run paragraph API, but the option 2 should already
> be possible:
>
> https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html
>
>
>
> On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:
>
> > Hi Zeppelin dev fellows,
> >
> > I was finding a way to run notebook via REST API with dynamic variable,
> and
> > seems like there's no way to get it.
> >
> > I found three ways to achieve that functionality (Sure there could be
> > more), please see below.
> >
> > 1. provide a way to update (I mean replace) content of the paragraph
> >
> > pros.
> > Very flexible. In this case we can prepare notebook, and clone it, and
> > replace specific paragraph which contains assignation of variables.
> >
> > cons.
> > I don't know about the side-effect. What if another user is playing
> > (especially modifying) with that notebook?
> >
> > 2. provide a way to put parameters when submitting run paragrath in REST
> > API
> >
> > pros.
> > Flexible enough, most promising way to have.
> >
> > cons.
> > Is there a way to receive parameter without breaking use cases via UI? I
> > couldn't imagine it.
> > At first I was considering ZeppelinContext, but it is not global feature
> > (bound to Spark interpreter).
> >
> > 3. provide a way to have paragraphs when submitting create notebook in
> REST
> > API
> >
> > pros.
> > It doesn't break anything. (right?) We just add paragraph(es) immediately
> > after creating notebook.
> >
> > cons.
> > Restricted. We need to delete executed notebooks (garbages?) by hand.
> >
> > I'm willing to contribute feature to Zeppelin, so when we decide the best
> > way (or ways) to accomplish, I'll try to implement it.
> >
> > Please share your opinion. Thanks in advance!
> >
> > Best,
> > Jungtaek Lim (HeartSaVioR)
> >
>



-- 
Name : 임 정택
Blog : http://www.heartsavior.net / http://dev.heartsavior.net
Twitter : http://twitter.com/heartsavior
LinkedIn : http://www.linkedin.com/in/heartsavior

Re: Way to run notebook via REST API with dynamic content

Posted by Corneau Damien <co...@gmail.com>.
I don't know about the Run paragraph API, but the option 2 should already
be possible:
https://zeppelin.incubator.apache.org/docs/0.6.0-incubating-SNAPSHOT/manual/dynamicform.html



On Tue, Dec 15, 2015 at 12:37 PM, 임정택 <ka...@gmail.com> wrote:

> Hi Zeppelin dev fellows,
>
> I was finding a way to run notebook via REST API with dynamic variable, and
> seems like there's no way to get it.
>
> I found three ways to achieve that functionality (Sure there could be
> more), please see below.
>
> 1. provide a way to update (I mean replace) content of the paragraph
>
> pros.
> Very flexible. In this case we can prepare notebook, and clone it, and
> replace specific paragraph which contains assignation of variables.
>
> cons.
> I don't know about the side-effect. What if another user is playing
> (especially modifying) with that notebook?
>
> 2. provide a way to put parameters when submitting run paragrath in REST
> API
>
> pros.
> Flexible enough, most promising way to have.
>
> cons.
> Is there a way to receive parameter without breaking use cases via UI? I
> couldn't imagine it.
> At first I was considering ZeppelinContext, but it is not global feature
> (bound to Spark interpreter).
>
> 3. provide a way to have paragraphs when submitting create notebook in REST
> API
>
> pros.
> It doesn't break anything. (right?) We just add paragraph(es) immediately
> after creating notebook.
>
> cons.
> Restricted. We need to delete executed notebooks (garbages?) by hand.
>
> I'm willing to contribute feature to Zeppelin, so when we decide the best
> way (or ways) to accomplish, I'll try to implement it.
>
> Please share your opinion. Thanks in advance!
>
> Best,
> Jungtaek Lim (HeartSaVioR)
>