Databricks Widgets In Python Notebook

Опубликовано: 03 Июнь 2026
на канале: Grab N Go Info
3,357
18

Databricks widget API enables users to apply different parameters for notebooks and dashboards. It’s best for re-running the same code using different parameter values. When used in dashboards, it creates filters for the dashboard charts.

Databricks supports both python and SQL code for the widget API. In this tutorial, we will talk about how to create widgets using python. We will cover:

👉 How to create different types of widgets using python?
👉 How to retrieve widgets values?
👉 How to pass the widget values to notebooks and dashboards?
👉 How to configure the widget setup?
👉 How to delete widgets?

⏰ Timecodes ⏰
0:00 - Intro
0:50 - Step 0: Databricks Widget Types
1:37 - Step 1: Import Libraries
1:53 - Step 2: Read In Dataset
2:39 - Step 3: Create Databricks Widgets Using Python
3:43 - Step 4: Get Values From Databricks Widgets
3:59 - Step 5: Pass Widget Values in Python Code
5:03 - Step 6: Use Widgets As Filters For Dashboard
5:51 - Step 7: Configure Databricks Widgets
6:37 - Step 8: Pass Values to Widgets in Another Notebook
6:54 - Step 9: Delete Databricks Widgets
7:15 - Summary

❤️ Blog post with code for this video:   / databricks-widgets-in-python-notebook  
📒 Code Notebook: https://mailchi.mp/fd3414b69306/r4j35...
🚛 GrabNGoInfo Machine Learning Tutorials Inventory:   / grabngoinfo-machine-learning-tutorials-inv...  

🏪 Purchase data science and computer science themed products in my Amazon store: https://amzn.to/40HUTsl
🙏 Give me a tip to show your appreciation: https://www.paypal.com/donate/?hosted...
✅ Join Medium Membership: If you are not a Medium member and would like to support me to keep creating free content (😄 Buy me a cup of coffee ☕), join Medium membership through this link:   / membership  
You will get full access to posts on Medium for $5 per month, and I will receive a portion of it. Thank you for your support!

🧱Databricks Tutorial Playlist
   • Databricks Mount To AWS S3 And Import Data  

🔥 Check out more machine learning tutorials on my website!
https://grabngoinfo.com/tutorials/
📣 Speech software used in the video: Descript https://www.descript.com/?lmref=h7XYQw
📧 CONTACT me at [email protected]
👩🏻‍💻 Follow me on LinkedIn:   / grabngoinfo  

#databricks #datascience #machinelearning #grabngoinfo