cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is there an automated way to strip notebook outputs prior to pushing to github?

jimbender
New Contributor II

We have a team that works in Azure Databricks on notebooks.

We are not allowed to push any data to Github per corporate policy.

Instead of everyone having to always remember to clear their notebook outputs prior to commit and push, is there a way this can be automated?  Thanks in advance!! : ) 

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz
Community Manager
Community Manager

Hi @jimbender, Yes, there are ways to automate the process of clearing notebook outputs in Azure Databricks. 

 

Here are a couple of options:

 

Manual Clearing: Azure Databricks provides options to clear the notebook state and outputs. You can select one of the Clear options at the bottom of the Run menu. This is useful if you are sharing the notebook and do not want to include any results.

 

Automated Clearing: For an automated solution, you might need to write a script that exports each no.... However, this approach has some limitations. It will change the notebook ID, which will break bookmarks if people have them. Also, youโ€™ll need to script this yourself using list API to list notebooks and directories and walk ....

 

I hope this helps! If you have any more questions, feel free to ask. ๐Ÿ˜Š

View solution in original post

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @jimbender, Yes, there are ways to automate the process of clearing notebook outputs in Azure Databricks. 

 

Here are a couple of options:

 

Manual Clearing: Azure Databricks provides options to clear the notebook state and outputs. You can select one of the Clear options at the bottom of the Run menu. This is useful if you are sharing the notebook and do not want to include any results.

 

Automated Clearing: For an automated solution, you might need to write a script that exports each no.... However, this approach has some limitations. It will change the notebook ID, which will break bookmarks if people have them. Also, youโ€™ll need to script this yourself using list API to list notebooks and directories and walk ....

 

I hope this helps! If you have any more questions, feel free to ask. ๐Ÿ˜Š

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!