Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 08:28 AM
This is the approach I am currently taking. It is documented here: https://stackoverflow.com/questions/62774448/how-to-capture-cells-output-in-databricks-notebook
from IPython.utils.capture import CapturedIO
capture = CapturedIO(sys.stdout, sys.stderr)
...
...
# at the end of desired output:
cmem = capture.stdoutI am writing the contents of cmem variable to a file in BLOB. BLOB is mounted to DBFS.
It would be good to see a working example supporting the @Hubert Dudek 's REST API approach that he mentioned above.