- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to get variable value in %jdbc context
- Labels:
-
Apache Zeppelin
Created ‎07-11-2016 12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In zeppelin notebook, there are 2 paragraphs
In paragraph 1 - I have a python script which gets value from a rest-api call and assign it to a variable. I used z.put("var1",var) to set the variable.
In paragraph-2 , I am using %jdbc to run a sql query on a mysql table. e.g select abc from tb1 where name = '<variable>'
Question is - How can i pass var1 to the query and replace <variable> with value of var1. Any hints will be helpful
Created ‎10-14-2016 03:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its currently not possible as in zeppelin 0.6.
"Zeppelin's interpreter abstraction allows any interpreter creates something like Z context. To expose Z context to user in %jdbc interpreter, we need proper syntax for it. i.e. %spark interpreter expose Z context as scala api. %pyspark interpreter expose Z context as python api. %jdbc interpreter expose Z context as ..?"
Related defect - https://issues.apache.org/jira/browse/ZEPPELIN-1363
Created ‎10-14-2016 03:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its currently not possible as in zeppelin 0.6.
"Zeppelin's interpreter abstraction allows any interpreter creates something like Z context. To expose Z context to user in %jdbc interpreter, we need proper syntax for it. i.e. %spark interpreter expose Z context as scala api. %pyspark interpreter expose Z context as python api. %jdbc interpreter expose Z context as ..?"
Related defect - https://issues.apache.org/jira/browse/ZEPPELIN-1363
