admin管理员组文章数量:1434388
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
1 Answer
Reset to default 1Currently, 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.
本文标签: databricksDebugging a workflowStack Overflow
版权声明:本文标题:databricks - Debugging a workflow - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745622736a2666785.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论