Databricks交互式无服务器计算集群中SQL Widgets无法正常工作咨询
问题:Databricks无服务器Notebook中SQL下拉Widget创建失败
场景重现
使用以下SQL代码在Notebook中创建包含三个选项的下拉Widget:
create widget dropdown environment default 'int' choices select * from (values ('int'), ('stage'), ('prod'));
该代码在个人通用计算集群上运行完全正常,但切换到无服务器计算Notebook后,触发如下错误:
DriverException: Selection sequence must include int File <command-2382736690910233>, line 1 ----> 1 get_ipython().run_cell_magic('sql', '', "create widget dropdown environment default 'int' choices select * from (values ('int'), ('stage'), ('prod'));\n") File /databricks/python_shell/dbruntime/sql_magic/sql_magic.py:163, in SqlMagic.sql(self, line, cell) 161 break 162 elif request.get("status") == "error": --> 163 raise DriverException(request.get("message")) 164 else: 165 # this should never happen 166 raise Exception("Unknown comm message received: " + str(request))
疑问
这是无服务器Notebook集群的普遍问题吗?
补充:Python版本的Widget可以正常运行,但我的Notebook其余部分均为SQL代码,不想改用Python实现:
dbutils.widgets.dropdown("environment", "int", ["int", "stage", "prod"])
内容的提问来源于stack exchange,提问作者pvorb
相关产品推荐
相关产品推荐

