cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
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!! : ) 

2 REPLIES 2

ManviLather
New Contributor II

I am in the same situation. Curious to know how you resolved this issue.

brycejune
New Contributor III

Hi,

pushing to GitHub isnโ€™t allowed, but clearing notebook outputs before internal version control is still important, you can automate this process by using a pre-commit hook or a script within your internal CI/CD pipeline (if one exists). Tools like nbstripout or pre-commit can be configured to automatically clear outputs from Jupyter/Databricks notebooks before saving or committing. This ensures consistency and avoids manual errors while complying with your policy.

Regards,
Bryce June

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now