是否可以在Zeppelin Notebook中设置全局变量? [英] Is it possible to set global variables in a Zeppelin Notebook?
问题描述
我正在尝试使用Zeppelin笔记本创建多段式仪表板.我希望使用仪表板的人只需输入某些参数一次.例如.如果我要制作一个包含有关不同网站信息的仪表板,则该仪表板用户只需选择一次他们想要获得有关该信息的特定网站,整个多段仪表板就会更新.这可能吗?如何在笔记本中设置像这样的全局变量?
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?
为澄清起见,我打算用于Zeppelin的参数输入称为动态表单" .
To clarify, the parameter input that I intend to use for Zeppelin is referred to as "dynamic form".
推荐答案
使用z.put
和z.get
可以在不同笔记本上共享变量.
Using z.put
and z.get
can share variable over different notebooks.
z.put("name", "zeppelin")
z.get("name")
可能与z.angularBind
和z.angular
结合使用以在仪表板中使用. ref 如何放置Zeppelin中的javascript中将变量添加到z ZeppelinContext中?
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?
这篇关于是否可以在Zeppelin Notebook中设置全局变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!