我想使用groovy创建一个动态的'select'。选择范围应为笔记本。
Zeppelin版本:0.8.0
问题是,当我尝试使用g.noteSelect
时出现异常。在检查了g
上可用的方法之后,很明显noteSelect
不是g
方法。
如何创建具有动态特性的动态(笔记本范围)选择?
我的代码:
%groovy
def tunnels = ['c':'c','v':'v']
//g.noteSelect('SelectTunnel', 'None', tunnels)
print(org.apache.zeppelin.groovy.GObject.declaredMethods.findAll { !it.synthetic }.name)
输出
class org.apache.zeppelin.groovy.GObject[html, startOutputType, toParamOptions, getAngularObject, angular, angularBind, angularBind, getInterpreterContextRunner, getInterpreterContextRunner, runNote, runNote, runAll, runAll, checkbox, checkbox, select, select, input, input, getGui, run, run, run, get, get, put, setProperty, getProperty, getProperties, table]
我的解决方案是使用scala(%spark),以便可以使用z.noteSelect(..)