Monday
Hi All,
With the new availability of debugging notebooks are really great. But how do you debug a workflow? Any suggestions on recommended practices on how to debug workflows?
Best R, Thomas
Monday - last edited Monday
You can define widgets in your notebook in the following way (see screenshot). When databricks workflow is running it will pass all required parameters and you can use code you've provided to read these values key1=dbutils.widgets.get("Key1").
But, let's say that something went wrong and you want to debug. Than just fill parameters of widget with values and
and now you can debug without changing any code ๐
dbutils.widgets.text("param_source_schema", defaultValue="")
param_source_schema = dbutils.widgets.get("param_source_schema")
Monday
Please refer to this doc and confirm if it's helpful
https://docs.databricks.com/en/jobs/repair-job-failures.html#re-run-failed-and-skipped-tasks
Monday
I am not trying to fix a failed job, but trying to find an approach to debug a workflow line by line. You can debug a note book, but how do you debug a workflow?
Monday - last edited Monday
Hi @Sega2 ,
You can't debug from workflows UI. If notebook/python code failed in workflow, you need to manually find that notebook/module and then you can run it manually (passing all required parameters, if any) and use debugger from there.
Monday
Thanks. I think we are getting closer now. What is the recommended practice for passing parameters in the notebook? In the notebook you have something like
Monday - last edited Monday
You can define widgets in your notebook in the following way (see screenshot). When databricks workflow is running it will pass all required parameters and you can use code you've provided to read these values key1=dbutils.widgets.get("Key1").
But, let's say that something went wrong and you want to debug. Than just fill parameters of widget with values and
and now you can debug without changing any code ๐
dbutils.widgets.text("param_source_schema", defaultValue="")
param_source_schema = dbutils.widgets.get("param_source_schema")
yesterday
That makes perfectly sense. Seems like thats the way to go. Thanks alot appreciated. I am new to Databrix how do you normally debug as an experienced DBX developer? Databricks connect or just in the browser and built in UI?
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