是否可以在 Zeppelin Notebook 中设置全局变量? [英] Is it possible to set global variables in a Zeppelin Notebook?

查看:48
本文介绍了是否可以在 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.putz.get 可以在不同的笔记本上共享变量.

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

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

可能与 z.angularBindz.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆