cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to export/clone Databricks Notebook without results via web UI?

dataslicer
Contributor

When a Databricks Notebook exceeds size limit, it suggests to `clone/export without results`.  
This is exactly what I want to do, but the current web UI does not provide the ability to bypass/skip the results in either the `clone` or `export` context menus.  Additional note: I do not want to clear the outputs of the current notebook.

Screenshots provided for visual context.  Not sure if there are other places that I may have overlooked.  

Fact finding performed so far:

 

Thank you in advance for any insights you can share on achieving this goal.  

3 REPLIES 3

Yeshwanth
Databricks Employee
Databricks Employee

@dataslicer good day!

When you export a notebook as HTML, IPython notebook (.ipynb), or archive (DBC), and you have not cleared the command outputs, the outputs are included in the export.

Kind regards,

Yesh

dataslicer
Contributor

Thank you @Yeshwanth for the response. 


I am looking for a way without clearing up the current outputs. 
This is necessary because I want to preserve the existing outputs and fork off another notebook instance to run with few parameter changes and come back to compare the output results.  This way the forked notebook attempt is not restricted by the notebook max size limitations.  

Thank you

 

sb7
New Contributor II

I have a similar use case as yours but I couldn't find any way to export a notebook without its outputs as a dbc or ipython file.

What worked for me is to export the notebook as a source file, which creates a .py file. Then I import the .py file back into databricks and its interpreted as a regular notebook. I fork off my experimentation using this new notebook.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group