cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

The risks of code execution by default on widget change

Israel_H
New Contributor III

Taking from my experience, the default action of widgets triggering code execution upon value change poses risks that outweigh the convenience in certain scenarios.

While this feature may seem advantageous in some cases, it can lead to unintended consequences and a less controlled development environment. Having a widget's value change automatically trigger code execution during the midst of development or maintenance can have significant ramifications if the code is not adequately structured or tested. Moreover, it becomes even more problematic if the inattentive user fails to perceive that an execution has occurred.

Given these considerations, I believe the default behavior for widget value change should be to do nothing, or at least make it so that the user can customize this setting in their preferences. Additionally, implementing a visual cue in the IDE to indicate that widget changes will trigger code execution would provide developers with a clearer understanding of the potential impacts of their actions.

3 REPLIES 3

feiyun0112
Honored Contributor

click gear icon on top right, set Widget panel settings

capture 2024-02-06 032347.png

 

 

Israel_H
New Contributor III

Yes, I'm aware that it can be changed for each notebook. What I don't think is safe is for it to 'Run' by default instead of 'Do nothing'.

Kayla
Valued Contributor

I definitely have to agree with the original point- if you have a notebook that you import, and you touch any widget value you're running code, most likely accidentally. I'd love to see a workspace or user type option where you can change the default to "do nothing" for all widgets/notebooks.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group