Interpreters can be used as %GROUP.INTERPRETER_TYPE (%hive.sql for example) But it also means that you can only have one interpreter bind to a notebook for each group (Otherwise we wouldn't know which one to use). So in a notebook, you wouldn't be able to use 2 different PostgreSQL server (2 interpreters with different config) So If we could have something like %INTERPRETER_NAME.GROUP.INTERPRETER_TYPE it would solve the problem
On Thu, Jul 30, 2015 at 8:51 PM, Christian Tzolov <ctzo...@pivotal.io> wrote: > @Corneau, > I am not sure i'm following you :). Are you suggesting that at the moment > the 'group' is not part of the interpreter's name but IF its re-implemented > to be part of the name then the issue i am facing would be resolved? Sorry > i've misunderstood what you are saying. > > On 30 July 2015 at 12:29, Corneau Damien <cornead...@gmail.com> wrote: > >> Yes, >> The dot and group was introduced to be able to use interpreter keywords >> (for example %sql) for multiple technologies, >> its not base on the interpreter name itself. Although doing it could fix >> the problems of using multiple interpreters of the same kind in one note. >> >> On Thu, Jul 30, 2015 at 8:34 AM, Christian Tzolov <ctzo...@pivotal.io> >> wrote: >> >>> @Corneau Damien this doesn't work for me. >>> >>> @DuyHai Doan observation is correct that if you use the original >>> %interpreter schema, bind the new Interpreter and UNBIND the old one then >>> the original %interpreter schema will use the newly defined >>> configurations. But in my use cases i need to use both instances in the >>> same Notebook (e.g. connect to different DBs). >>> >>> I've implemented a PostgreSQL Interpreter and I need to be able to >>> connect to different DBs in the same Notebook. My default interpreter >>> schema works fine: >>> >>> %psql.sql >>> SELECT count(*) FROM retail_demo.order_lineitems_pxf >>> 1,024,158 >>> >>> Then i create a new Interpreter psql2 of type psql: >>> (NEW_PSQL_INTERPTER_INSTANCE.png), >>> Bind both PSQL and PSQL2 to my Notebook >>> (BIND_PSQL2_AND_PSQL1_TO_NOTEBOOK.png) >>> But the new Interpreter if not found. No matter how i try to define it >>> in the paragraphs: USING_PSQL2.png >>> >>> Result is always: XXX interpreter not found >>> >>> >>> >>> >>> >>> >>> >>> On 30 July 2015 at 00:03, Vadla, Karthik <karthik.va...@intel.com> >>> wrote: >>> >>>> Perfect. Thank you very much J >>>> >>>> >>>> >>>> *From:* DuyHai Doan [mailto:doanduy...@gmail.com] >>>> *Sent:* Wednesday, July 29, 2015 2:34 PM >>>> >>>> *To:* users@zeppelin.incubator.apache.org >>>> *Subject:* Re: Multiple instances of the same Interpreter, each with >>>> different configuration >>>> >>>> >>>> >>>> So below are steps with screenshots: >>>> >>>> >>>> >>>> 1. Create new instance of your interpreter and give it a name >>>> >>>> >>>> >>>> >>>> https://s3.amazonaws.com/uploads.hipchat.com/6528/1159542/WBIst6M7b2FdhgM/upload.png >>>> >>>> >>>> >>>> 2. Create a new notebook and click on the gear icon on the top right >>>> corner to open the interpreter bindings panel. There choose the instance >>>> you just created (in my case, "my_own_instance"). Then validate with "Save" >>>> >>>> >>>> >>>> >>>> https://s3.amazonaws.com/uploads.hipchat.com/6528/1159542/mJjQdIpNiDgf47W/settings2.png >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> 3. In the notebook, just use the usual %interpreter syntax but this >>>> time it will bind to the new instance (in my example %cassandra will bind >>>> to "my_own_instance") >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jul 29, 2015 at 10:56 PM, Vadla, Karthik < >>>> karthik.va...@intel.com> wrote: >>>> >>>> Hi DuyHai, >>>> >>>> >>>> >>>> 3. In the paragraph, the notation %instance2.cassandra does not work, >>>> neither %instance2 nor %cassandra.instance2, only %cassandra works and it >>>> *indeed >>>> refers to the second instance because I chose it at the notebook config >>>> level* >>>> >>>> >>>> >>>> How to tell the notebook to choose interpreter which I created. Can you >>>> please explain where exactly I need to make changes (do you mean in need to >>>> edit zeppelin-env.sh ??). >>>> >>>> >>>> >>>> I just tried to create new interpreter with name *hiveonspark* which >>>> is instance of *hive . * I tried to access with * %hiveonspark* but it >>>> does not work. >>>> >>>> >>>> >>>> Thanks >>>> >>>> Karthik >>>> >>>> >>>> >>>> *From:* DuyHai Doan [mailto:doanduy...@gmail.com] >>>> *Sent:* Wednesday, July 29, 2015 1:49 PM >>>> *To:* users@zeppelin.incubator.apache.org >>>> *Subject:* Re: Multiple instances of the same Interpreter, each with >>>> different configuration >>>> >>>> >>>> >>>> So I tried this trick with my Cassandra interpreter: >>>> >>>> >>>> >>>> 1. Create a new interpreter named "instance2" (the group name is >>>> "cassandra") >>>> >>>> >>>> >>>> 2. Create a new notebook and choose "instance2" instead of the original >>>> "cassandra" as interpreter for this notebook" >>>> >>>> >>>> >>>> 3. In the paragraph, the notation %instance2.cassandra does not work, >>>> neither %instance2 nor %cassandra.instance2, only %cassandra works and it >>>> indeed refers to the second instance because I chose it at the notebook >>>> config level >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Jul 29, 2015 at 5:33 AM, Corneau Damien <cornead...@gmail.com> >>>> wrote: >>>> >>>> Hi, >>>> >>>> This should be pretty much how it works (Creating + binding to notebook) >>>> >>>> But I think the syntax when using group in your paragraph might be % >>>> GROUP_NEW.NAME >>>> >>>> >>>> >>>> Tell me if this works >>>> >>>> >>>> >>>> On Tue, Jul 28, 2015 at 8:34 PM, Christian Tzolov <ctzo...@pivotal.io> >>>> wrote: >>>> >>>> Hi, >>>> >>>> Is it possible to instantiate multiple instances of the same >>>> Interpreter type, where each instance is configured differently? >>>> >>>> Assuming there is a working instance: GROUP:NAME. From the >>>> 'Interpreter' section i can create a new Interpreter instance from >>>> particular Interpreter type: GROUP_NEW:NAME. Then I can bind the new >>>> instance (GROUP_NEW:NAME) through the Notebook's configuration but if i try >>>> to use it i get: >>>> >>>> %GROUP_NEW:NAME >>>> >>>> ..... >>>> "XXXX interpreter not found" >>>> >>>> >>>> >>>> Am i missing something? >>>> >>>> >>>> Apologies if this question has been asked already (couldn't found >>>> related infor in the archive). >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Christian >>>> >>>> >>>> >>>> -- >>>> >>>> Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution >>>> Architect, EMEA Practice Team | Pivotal <http://pivotal.io/> >>>> >>>> ctzo...@pivotal.io|+31610285517 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution >>> Architect, EMEA Practice Team | Pivotal <http://pivotal.io/> >>> ctzo...@pivotal.io|+31610285517 >>> >> >> > > > -- > Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution > Architect, EMEA Practice Team | Pivotal <http://pivotal.io/> > ctzo...@pivotal.io|+31610285517 >