Hi,
I'm trying to use the %sql with variable created beforehand and it does not
work.
*My setup:*
1. Zeppelin that runs on top of Spark in yarn-client mode with 4 nodes.
2. Hive as the underneath layer, i.e. %sql goes to Hive metastore
*This is what I want to achieve:*
1. Collect table list and present it to the user on a dropdown
2. When the user choose a table, it gets table's field list and present it
in a dropdown
3. Then the user choose field a SQL query submitted something as follows:
*"select * from <choose table> order by <choose filed>"*
And present its results in table (same as return from %sql or %table).
I encountered few problems:
1. I couldn't 'inject' pre calculate variables into %sql statement. I tried
using println (that works for %table) but it does not work.
2. I tried using %table. With that I have few problems:
1. it does not work on the same box and I need to put it in the next box
(and its poor UX as the user need to choose in the first box and than
to run the next one to get the 'nice' table).
and
2. I need to create the %table format (with tabs etc...) instead of
using direct %sql.
Hope I was clear...
I guess the straight forward should have be a way to 'inject' variables
into %sql statement.
Is that possible?
Thanks,
Ophir