I am trying to accomplish the following use case on Apache Zeppelin:
When I write an sql
query, for example
%sql SELECT * FROM table1 WHERE column1 = ${column1=1,1|2|3|4}
I get a combo box displayed with these values (1,2,3,4)
as options.
What I want to do is populate this list with all distinct values available for this column (or as a matter of fact any other set of values which I might want to take from another paragraph in form of a variable). So currently I am stuck at how to use some variables defined in one paragraph inside an sql
statement in another paragraph ?
Diving into the code, I saw that inside the Zeppelin-interpreter, a file called Input.java
checks for a pattern ${someColumn=someValues}
, fills up the combo-box options and then creates a simple query, and hence I have dropped the idea of populating it by running a query in the same paragraph.