You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Carmella Smith <ca...@tubemogul.com> on 2016/09/02 18:49:46 UTC

New functionality request: run all paragraphs via API with optional JSON params

Hello Zeppelin experts,

The API doc here:
https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-notebook.html
has details on how to run one paragraph with optional input parameters.  It
works perfectly, with and without parameters.  There is also doc on how to
run all paragraphs in a notebook.  If none of the paragraphs take any
parameters, it also works perfectly.  We have notebooks in which all the
paragraphs do take parameters, and each paragraph takes exactly the same
parameters.  We would like to run all paragraphs with one Run All
Paragraphs request:
https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-notebook.html#run-all-
paragraphs
with the optional json body described in Run a Paragraph:
https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-
notebook.html#run-a-paragraph
applied to each paragraph in the notebook.  I tried it, even though the doc
makes no promises of that working, and while the log shows that the
paragraphs ran, alas, it also shows that the input parameters sent in via
the JSON body were NOT applied.

I realize that we can use a java app to fetch the paragraph ids from Get
the Status of All Paragraphs
https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-
notebook.html#get-the-status-of-all-paragraphs
and loop through those paragraph ids to run each paragraph with the input
params in the JSON body with Run a Paragraph, but since the JSON body of
input params is exactly the same for each paragraph, it would be fabulous
to run them all in one fell swoop with one http request to the Run All
Paragraphs API.  Might it be possible to have this new functionality?

Thanks so much for considering it,
Carmella Smith

Re: New functionality request: run all paragraphs via API with optional JSON params

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

Thanks for valuable feedbacks and a suggestion.

I think make run notebook rest api accept input params make sense, while
run a paragraph rest api accept input param.
But applying same params to all paragraphs is not general enough to cover
the all other usecases of those input params.

So, if run notebook rest api support params, i think it should accept list
of params for each paragraphs.

For special use case, that all paragraphs uses the same params, i think
implementing https://issues.apache.org/jira/browse/ZEPPELIN-1363 and
corresponding rest api is better approach.

Thanks,
moon

On Fri, Sep 2, 2016 at 11:49 AM Carmella Smith <ca...@tubemogul.com>
wrote:

> Hello Zeppelin experts,
>
> The API doc here:
> https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-notebook.html
> has details on how to run one paragraph with optional input parameters.
> It works perfectly, with and without parameters.  There is also doc on how
> to run all paragraphs in a notebook.  If none of the paragraphs take any
> parameters, it also works perfectly.  We have notebooks in which all the
> paragraphs do take parameters, and each paragraph takes exactly the same
> parameters.  We would like to run all paragraphs with one Run All
> Paragraphs request:
>
> https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-notebook.html#run-all-paragraphs
> with the optional json body described in Run a Paragraph:
>
> https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-notebook.html#run-a-paragraph
> applied to each paragraph in the notebook.  I tried it, even though the
> doc makes no promises of that working, and while the log shows that the
> paragraphs ran, alas, it also shows that the input parameters sent in via
> the JSON body were NOT applied.
>
> I realize that we can use a java app to fetch the paragraph ids from Get
> the Status of All Paragraphs
>
> https://zeppelin.apache.org/docs/0.6.0/rest-api/rest-notebook.html#get-the-status-of-all-paragraphs
> and loop through those paragraph ids to run each paragraph with the input
> params in the JSON body with Run a Paragraph, but since the JSON body of
> input params is exactly the same for each paragraph, it would be fabulous
> to run them all in one fell swoop with one http request to the Run All
> Paragraphs API.  Might it be possible to have this new functionality?
>
> Thanks so much for considering it,
> Carmella Smith
>
>
>