最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

databricks - Debugging a workflow - Stack Overflow

matteradmin3PV0评论

How do you guys debug a workflow in databricks? Notebooks now have integrated debugging tooling, but how do you debug the Notebook the workflow is calling with parameters etc? Can I make a test notebook that call the notebook with parameters like the workflow, and somehow debug into my notebook, or how are you in general getting a debugging experience with breakpoints in a notebook that is called from a workflow?

How do you guys debug a workflow in databricks? Notebooks now have integrated debugging tooling, but how do you debug the Notebook the workflow is calling with parameters etc? Can I make a test notebook that call the notebook with parameters like the workflow, and somehow debug into my notebook, or how are you in general getting a debugging experience with breakpoints in a notebook that is called from a workflow?

Share Improve this question asked Nov 18, 2024 at 11:10 Thomas SegatoThomas Segato 5,30716 gold badges67 silver badges132 bronze badges 2
  • Could you please provide your approach, if you have tried anything? – Bhavani Commented Nov 18, 2024 at 11:15
  • Well I have not found any ways to get a breakpoint in a workflow it self. So I was thinking whether I could make a debug notebook that call the working notebook with same parameters as the workflow. I tried with %run "./debug-tester-nb" dbutils.notebook.run("debug-tester-nb", 60, {"Key1": "data", "Key2": "data2"}). And then I hoped I could do a step into with debugger, but did not work. I need some way to be able to call a notebook in the same way as the workflow do and get a full debug developer experience. – Thomas Segato Commented Nov 18, 2024 at 11:20
Add a comment  | 

1 Answer 1

Reset to default 1

Currently, the debugging the workflows is not supported. To debug the workflow, you can make use of the notebook debugger as a workaround, but you need to do this process manually.

After the workflow run, take the failed code block and use another notebook cell and use the notebook debugger here.

If you are using any workflow parameters in that code, you can make use of the notebook widgets in place of those workflow parameters and pass the required values to the widgets as shown in below sample.

print("hi")
# Define widget
dbutils.widgets.text("param1","")
# use it as workflow parameter
print(dbutils.widgets.get("param1"))
print("bye")

You can set the default value as well like below.

Post a comment

comment list (0)

  1. No comments so far