1

We have a need to ensure that all data of a given type have been removed from our system. This includes any cell output that might exist in a Databricks Notebook.

Is there a way to clear the cell outputs from all cells in all Notebooks starting from a given root (e.g. for an entire instance or for all notebooks in a given directory and sub-directories).

John
  • 3,458
  • 4
  • 33
  • 54
  • 1
    Does this answer your question? [Delete all the cells of the Databricks Notebook](https://stackoverflow.com/questions/66073702/delete-all-the-cells-of-the-databricks-notebook) – easleyfixed Apr 03 '23 at 19:14
  • No, I need to clear the contents of all Notebooks in a given instance or folder. – John Apr 03 '23 at 19:20

1 Answers1

1

The closest alternative that I can think about is to export each notebook as SOURCE and then import it back into the same location. But this will change the notebook ID that will break bookmarks if people have them. Plus you'll need to script this yourself using list API to list notebooks & directories and walk through the list

Alex Ott
  • 80,552
  • 8
  • 87
  • 132