Thanks for sharing the example. ZeppelinContext has run(paragraphId or paragraphIndex) method. I think it's fine to expose add new paragraph method through ZeppelinContext.
Thanks, moon On Sat, Feb 13, 2016 at 8:24 PM Zhong Wang <wangzhong....@gmail.com> wrote: > Chris, I've created a notebook demonstrating calling Zeppelin APIs inside > of a notebook: > https://www.zeppelinhub.com/viewer/notebooks/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3pob25nbmV1L215LXplcHBlbGluLW5vdGVzL21hc3Rlci8yQkNBSjZHVkEvbm90ZS5qc29u > > Zeppelin Developers: shall we consider exposing these APIs through > ZeppelinContext? This will be really helpful to build rich UI on top of > Zeppelin. The current REST solution isn't bad at all, but I am wondering > whether there is a better way. > > Thanks, > > Zhong > > On Mon, Feb 8, 2016 at 11:05 AM, Zhong Wang <wangzhong....@gmail.com> > wrote: > >> Sure. I will extract them out from my current code and create a simple >> one on github. There is one on Zeppelinhub created by Moon demonstrating >> setting the graph configuration programmatically: >> >> http://s.apache.org/57E >> >> Zhong >> >> On Mon, Feb 8, 2016 at 10:50 AM, Christopher Matta <cma...@mapr.com> >> wrote: >> >>> Could you share your notebook on github/gist? I'd be interested in >>> seeing it, and I'm sure the rest of the community would as well. >>> >>> Chris Matta >>> cma...@mapr.com >>> 215-701-3146 >>> >>> On Mon, Feb 8, 2016 at 1:47 PM, Zhong Wang <wangzhong....@gmail.com> >>> wrote: >>> >>>> I just got the graph settings worked by initializing and putting a >>>> graph map by myself into IntepreterContext.config. Sorry for the spam. I am >>>> still wondering the difference between using REST API and clicking the run >>>> button. It seems click the run button will generate some default graph >>>> settings for you? >>>> >>>> Zhong >>>> >>>> On Mon, Feb 8, 2016 at 10:28 AM, Zhong Wang <wangzhong....@gmail.com> >>>> wrote: >>>> >>>>> I got it worked using the REST API, and I am pretty help with it! >>>>> >>>>> There is just one issue: if I create and run the paragraph using the >>>>> REST API, I cannot get/set graph settings >>>>> using z.getInterpreterContext.getConfig(). It seems config is empty. >>>>> >>>>> What is the difference between running using the REST API and click >>>>> the run button? Is there anyway to set the graph settings using >>>>> InterpreterContext when run using the REST API? >>>>> >>>>> Thanks! >>>>> >>>>> Zhong >>>>> >>>>> On Sun, Feb 7, 2016 at 9:50 PM, Zhong Wang <wangzhong....@gmail.com> >>>>> wrote: >>>>> >>>>>> I'd like to create paragraphs programmatically using dynamic forms: >>>>>> select an item in dynamic form, create a graph immediately inside of that >>>>>> notebook. I can probably do that using the REST API, but I am wondering >>>>>> whether there is a better way to create paragraphs programmatically >>>>>> inside >>>>>> a notebook. >>>>>> >>>>>> Thanks! >>>>>> >>>>>> Zhong >>>>>> >>>>> >>>>> >>>> >>> >> >