Yes, it is impossible to get the default return from python code. I saw that on a different cloud provider you can get an output from logs also.
100% solution it is using dbutils.notebook.exit()
My Python Notebooks log some data into stdout and when I run this notebooks via UI I can see outputs inside cell.
Now I am running Python Notebooks on Databricks via API (/2.1/jobs/create and then /2.1/jobs/run-now) and would like to get output. I tried both /2.1/jobs/runs/get and /2.1/jobs/runs/get-output however none of the includes stdout of the Notebook.
Is there any way to access stdour of the Notebook via API?
P.S. I am aware of dbutils.notebook.exit() and will use it, if it will not be possible to get stdout.
Databricks how to get output of the Notebook Jobs via API?