Is it possible to set global variables in a Zeppelin Notebook?

Danny David Leybzon picture Danny David Leybzon · Oct 28, 2016 · Viewed 8.5k times · Source

I'm trying to create a multi-paragraph dashboard using a Zeppelin notebook. I'd like people using the dashboard to only have to enter certain parameters once. E.g. if I'm making a dashboard with information about different websites, the dashboard user only has to select the particular website they want information about once and the whole multi-paragraph dashboard will update. Is this possible? How do I set global variables like this in a notebook?

To clarify, the parameter input that I intend to use for Zeppelin is referred to as "dynamic form".

Answer

Rockie Yang picture Rockie Yang · Oct 28, 2016

Using z.put and z.get can share variable over different notebooks.

z.put("name", "zeppelin")
z.get("name")

Possibly combine with z.angularBind and z.angular to use it in dashboard. ref How to put a variable into z ZeppelinContext in javascript in Zeppelin?