英文:
How to change the order of Databricks widgets?
问题
我有许多Databricks小部件,但我无法更改它们的顺序。自动地,Databricks会按字母顺序对小部件进行排序。然而,我想根据它们的类别手动对它们进行排序。我知道我可以使用数字或字母,但这对最终用户来说不是最佳选项。
英文:
I have many Databricks widgets, but I cannot change their orders. Automatically, Databricks sorts the widgets alphabetically. However, I want to sort them manually based on their categories. I know that I can use numbers or letters, but this is not the best option for end-users.
答案1
得分: 3
I believe this is supported, at least in Databricks Premium.
Once you create some widgets,
dbutils.widgets.text('a_widget','a test')
dbutils.widgets.text('b_widget','another test')
You should see the widget bar appear, and there is an edit icon to the right.
This will allow you to drag/drop (also, resize!) the widgets in the order you choose.
You can see here, 'b_widget' is now before, 'a_widget'. You can click the check mark to confirm your changes.
英文:
I believe this is supported, at least in Databricks Premium.
Once you create some widgets,
dbutils.widgets.text('a_widget','a test')
dbutils.widgets.text('b_widget','another test')
You should see the widget bar appear, and there is an edit icon to the right.
This will allow you to drag/drop (also, resize!) the widgets in the order you choose.
You can see here, 'b_widget' is now before, 'a_widget'. You can click the check mark to confirm your changes.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论